Skip to content

ssr: false leaves build/server/index.js behind (was removed in v7) #15305

Description

@Marv51

Reproduction

https://stackblitz.com/edit/github-p4fmrsuw-6gsx1cu5 (I think the build folder is always initially empty, I see the behavior when I run npm run build)

System Info

System:
    OS: macOS 27.0
    CPU: (8) arm64 Apple M3
    Memory: 80.25 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.18.0 - /Users/marvin/.nvm/versions/node/v24.18.0/bin/node
    npm: 11.16.0 - /Users/marvin/.nvm/versions/node/v24.18.0/bin/npm
    Deno: 2.8.3 - /opt/homebrew/bin/deno
  Browsers:
    Chrome: 150.0.7871.115
    Safari: 27.0
  npmPackages:
    @react-router/dev: ^8.0.1 => 8.2.0 
    @react-router/node: ^8.0.1 => 8.2.0 
    @react-router/serve: ^8.0.1 => 8.2.0 
    react-router: ^8.0.1 => 8.2.0 
    vite: ^8.0.0 => 8.1.4

Used Package Manager

npm

Expected Behavior

In React Router 7 in Framework mode, the build/server directory was completely removed.

Actual Behavior

Build with ssr: true consolidates the server assets into the client directory (either moved or deleted from server directory), it cleans up the manifest, but the index.js file remains in the build/server directory.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions