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
假设我们的结构是这样的:
/src <-- context /styles variables.less <-- pattern /components /FooBar /index.less <-- use /node_modules /reset-less index.less
将/src作为context,将/src/styles/variables.less作为被style-resources-loader处理的文件。在variables.less中写这样的代码:
/src
context
/src/styles/variables.less
style-resources-loader
variables.less
@import "reset-less/index.less";
此时这个@import语句会被loader的逻辑修改为:../node_modules/reset-less/index.less
@import
../node_modules/reset-less/index.less
这导致在/src/components/FooBar/index.less中多出了@import "../node_modules/reset-less/index.less";这样一条语句,显然这是不可能找到正确的文件的
/src/components/FooBar/index.less
@import "../node_modules/reset-less/index.less";
The text was updated successfully, but these errors were encountered:
这里可能有几个细节:
less-loader
paths
Sorry, something went wrong.
No branches or pull requests
假设我们的结构是这样的:
将
/src
作为context
,将/src/styles/variables.less
作为被style-resources-loader
处理的文件。在variables.less
中写这样的代码:此时这个
@import
语句会被loader的逻辑修改为:../node_modules/reset-less/index.less
这导致在
/src/components/FooBar/index.less
中多出了@import "../node_modules/reset-less/index.less";
这样一条语句,显然这是不可能找到正确的文件的The text was updated successfully, but these errors were encountered: