-
-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
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
[Bug]: Unable to recognize the less variable in the third-party library (like component library) #6439
Comments
Fail to build because node_modules of packages/* are lost. |
It has been updated. Please take a look node_modules download address and project start method: https://jzq422bol5.feishu.cn/wiki/Pe7pwcmdaitTBNk18vKcXuQjnth?from=from_copylink |
this file is a css file other than a less file and the highlighted variable is a css variable as well.
please separate rules for less and css. e.g., [
{
test: /\.css$/,
use: [
{
loader: 'style-resources-loader',
options: {
// ...
}
}
],
type: 'css'
},
{
test: /\.less$/,
use: [
'less-loader',
{
loader: 'style-resources-loader',
options: {
// ...
}
}
],
type: 'css'
},
] or setting the {
test: lessRule,
use: [
{
loader: 'less-loader',options: {lessOptions: {math: 'parens'}}
},
{
loader: 'style-resources-loader',
options: {
// ...
}
}
],
type: 'css'
}, |
Thanks a lot |
System Info
macOS
node:v16.14.2
pnpm: 6.32.3
Details
webpack can operate normally:
rspack:
I can directly use the less variable in the project. The less variable used inside the third-party component library will report an error.
Reproduce link
https://github.com/op-sources/rspack-bug-playground
Reproduce Steps
There is no need to install node_modules, because the reproduce link is already included.
Run project:
start webpack server: cd packages/active: pnpm dev
start rspack server: cd packages/home: pnpm dev
The text was updated successfully, but these errors were encountered: