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
On using the native css.experiments in Rspack, attempting to use the (prefers-color-scheme) syntax on css @import, the css file gets included at compilation without being wrapped in an @media query, causing the expected conditional not to be applied.
Can you advise? Out of a large application i have one instance of this syntax causing me to revert to css-loader over handling everything in Rspack, bumping up the build time significantly.
System Info
System:
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Pro
Memory: 87.59 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.9.0 - ~/.asdf/installs/nodejs/20.9.0/bin/node
npm: 10.1.0 - ~/.asdf/installs/nodejs/20.9.0/bin/npm
pnpm: 9.15.2 - ~/.asdf/installs/nodejs/20.9.0/bin/pnpm
Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 132.0.6834.160
Safari: 17.6
npmPackages:
@rspack/cli: ^1.2.2 => 1.2.2
@rspack/core: ^1.2.2 => 1.2.2
Details
On using the native css.experiments in Rspack, attempting to use the
(prefers-color-scheme)
syntax on css@import
, the css file gets included at compilation without being wrapped in an@media
query, causing the expected conditional not to be applied.I'm not sure whether this is a bug or an expected unimplemented feature as per https://github.com/web-infra-dev/rspack/blob/cc5e3f6a49073b354c08ec4b8c75142e602d02ee/crates/rspack_plugin_css/webpack_css_cases_to_be_migrated/at-import-layer/style.css
Can you advise? Out of a large application i have one instance of this syntax causing me to revert to
css-loader
over handling everything in Rspack, bumping up the build time significantly.Reproduce link
https://github.com/daveskybet/repro-import-prefers-color-scheme
Reproduce Steps
@import
a css file using the(prefers-color-scheme)
syntax@media
queryThe text was updated successfully, but these errors were encountered: