react-router icon indicating copy to clipboard operation
react-router copied to clipboard

Inconsistent CSS resolution order between development and production

Open GabenGar opened this issue 4 months ago • 2 comments

Reproduction

https://github.com/87906913/408919357/tree/main/react-router/invalid-css-resolution-order

Reproduction steps are in the readme.

System Info

System:
    OS: Windows 10
    CPU: (4)
Binaries:
    Node: 22
    npm: 10

Used Package Manager

npm

Expected Behavior

CSS resolves consistently between environments.

Actual Behavior

CSS resolves differently between environments.

GabenGar avatar Jul 27 '25 19:07 GabenGar

Hey, just a wee bump on this issue. We're currently in the middle of migration, and facing the same issue. Do you have any update?

xalechez avatar Oct 02 '25 08:10 xalechez

Yeah I would like to know what is the underlying issue at least. Obviously it's because of different bundlers between environments, esbuild and rollup respectively. But the symptoms are the same as in the app router of NextJS, but that one is caused by webpack handling "sideEffects" in a specific way. Interesting to note vite in this test works just fine.

GabenGar avatar Oct 02 '25 13:10 GabenGar