-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Description
I'm using React Router as a...
framework
Reproduction
Visit https://stackblitz.com/edit/github-pq121seq. Once reload the page in the stackblitz preview and you will see the error messages in the terminal.
System Info
SystemInfo of the Stackblitz Reproduction
System:
OS: Linux 5.0 undefined
CPU: (2) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
@pigment-css/react: ^0.0.30 => 0.0.30
@pigment-css/vite-plugin: ^0.0.30 => 0.0.30
@react-router/dev: * => 7.5.0
@react-router/node: * => 7.5.0
@react-router/serve: * => 7.5.0
react-router: * => 7.5.0
vite: ^6.0.11 => 6.2.5
Used Package Manager
npm
Expected Behavior
PigmentCSS styles should be successfully applied and no error should be logged in the console. - The same behavior as one gets using vite v5
Actual Behavior
When using vite >= v6.0.0 and pigment-css, everytime a page containing pigment-css classes is refreshed an error is logged in the console.
Failed to load CSS for /tmp/my-react-router-app/app/root.pigment.css
The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose
The styles sometimes get applied, and sometimes not. (I could not figure out exactly when the styles get fully dropped)
The error gets logged regardless of whether the styles are applied successfully.
The error is not displayed when using vite v5.4.17.
jakobberglund