We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System: OS: macOS 14.1 CPU: (8) arm64 Apple M3 Memory: 65.58 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node Yarn: 1.22.21 - ~/.nvm/versions/node/v18.12.1/bin/yarn npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm pnpm: 8.15.5 - ~/.nvm/versions/node/v18.12.1/bin/pnpm Watchman: 2024.04.15.00 - /opt/homebrew/bin/watchman Browsers: Chrome: 124.0.6367.62 Edge: 124.0.2478.51 Safari: 17.1 npmPackages: @rspack/cli: 0.6.2 => 0.6.2 @rspack/core: 0.6.2 => 0.6.2 @rspack/plugin-react-refresh: 0.6.2 => 0.6.2
使用rspack-cli创建一个脚手架项目,安装sass sass-loader,参考https://www.rspack.dev/zh/guide/tech/css#sass,修改rspack.config.js。然后将 App.css文件修改为 App.module.scss 文件,并且使用 import styles from "./App.module.scss";引入。运行项目之后控制台报错,因为styles的值是 undefined。
sass sass-loader
App.css
App.module.scss
import styles from "./App.module.scss";
undefined
https://github.com/childrentime/rspack-project
pnpm i pnpm dev
The content you are editing has changed. Please copy your edits and refresh the page.
The text was updated successfully, but these errors were encountered:
You should use with namespace import like import * as styles from "./App.module.scss";.
import * as styles from "./App.module.scss";
If you want to use with default import, should set module.parser['css/auto'].namedExports=false.
module.parser['css/auto'].namedExports=false
You can get more detail in here: https://webpack.js.org/configuration/module/#moduleparser
Sorry, something went wrong.
No branches or pull requests
System Info
System:
OS: macOS 14.1
CPU: (8) arm64 Apple M3
Memory: 65.58 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 1.22.21 - ~/.nvm/versions/node/v18.12.1/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
pnpm: 8.15.5 - ~/.nvm/versions/node/v18.12.1/bin/pnpm
Watchman: 2024.04.15.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 124.0.6367.62
Edge: 124.0.2478.51
Safari: 17.1
npmPackages:
@rspack/cli: 0.6.2 => 0.6.2
@rspack/core: 0.6.2 => 0.6.2
@rspack/plugin-react-refresh: 0.6.2 => 0.6.2
Details
使用rspack-cli创建一个脚手架项目,安装
sass sass-loader
,参考https://www.rspack.dev/zh/guide/tech/css#sass,修改rspack.config.js。然后将App.css
文件修改为App.module.scss
文件,并且使用import styles from "./App.module.scss";
引入。运行项目之后控制台报错,因为styles的值是undefined
。Reproduce link
https://github.com/childrentime/rspack-project
Reproduce Steps
Tasks
The text was updated successfully, but these errors were encountered: