You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSMD-maintainers
changed the title
[Bug]: "getComputedStyle is not defined" using css experiment field set to true
[Bug]: "getComputedStyle is not defined" using css experiment field set to true on SSR
Oct 11, 2024
System Info
System:
OS: macOS 14.6
CPU: (10) arm64 Apple M1 Pro
Memory: 218.47 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
npm: 10.8.3 - ~/.nvm/versions/node/v18.18.2/bin/npm
pnpm: 6.35.1 - ~/.nvm/versions/node/v18.18.2/bin/pnpm
bun: 1.1.12 - /opt/homebrew/bin/bun
Browsers:
Chrome: 129.0.6668.90
Safari: 17.6
npmPackages:
@rspack/cli: ^1.0.0 => 1.0.0
@rspack/core: ^1.0.0 => 1.0.0
Details
When using the native css support it seems that SSR is not working in the sense that the application is responding with an error:
This is my configuration (the minimal reproducible link has a smaller configuration to narrow the focus):
// Error
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "getComputedStyle is not defined"
}
The js bundle generates the code as follows where it crashes:
I am following the this section of the docs: https://rspack.dev/guide/tech/css#sass
Expected behaviour:
Using css should not lead to an error. If you remove the css file and the css import in the
App.jsx
the app is running fine.Reproduce link
https://github.com/MarcoLeko/rspack-can-not-read-property-of-undefined
Reproduce Steps
The text was updated successfully, but these errors were encountered: