Skip to content

ssr bug in dev when using prerender #12924

Closed
@dadamssg

Description

@dadamssg

I'm using React Router as a...

framework

Reproduction

Clone the completed address-book tutorial here: https://github.com/dadamssg/address-book

System Info

System:
    OS: macOS 15.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 449.53 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.18.2 - ~/.volta/tools/image/node/20.18.2/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 10.8.2 - ~/.volta/tools/image/node/20.18.2/bin/npm
    pnpm: 9.9.0 - ~/Library/pnpm/pnpm
    bun: 1.1.38 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 129.1.70.117
    Chrome: 132.0.6834.160
    Safari: 18.2
  npmPackages:
    @react-router/dev: ^7.1.4 => 7.1.4 
    @react-router/node: ^7.1.4 => 7.1.4 
    @react-router/serve: ^7.1.4 => 7.1.4 
    react-router: ^7.1.4 => 7.1.4 
    vite: ^5.4.11 => 5.4.14

Used Package Manager

npm

Expected Behavior

I expect flipping the ssr true flag to have an effect. This seems to only happen when a prerender array is also defined even though it's not relevant to the current route.

Actual Behavior

If you start with ssr: true, changing it should have an effect. Video of issue here: https://youtu.be/epqpC3KmMM0

rr-ssr.480.mov

I'm using actions/loaders so it should immediately blow up when ssr is toggled off. I have to restart the dev server for the change to actually take affect.

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