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
4.2.0
- Operating System: MacOS 10.15.3 - Node Version: v13.0.1 - NPM Version: 6.12.0 - webpack Version: 4.42.0 - less-loader Version: 5.0.0
// vue.config.js css: { loaderOptions: { less: { paths: [path.resolve(__dirname, 'src/assets/styles/variables.less')], prependData: loaderContext => { const { resourcePath, rootContext } = loaderContext; const relativePath = path.relative(rootContext, resourcePath); return '@import "~@/assets/styles/variables.less";'; }, prependData: `@import "~@/assets/styles/variables.less";`, data: '@import "~@/assets/styles/variables.less";', }, }, },
全局注入Less全局变量配置
尝试了很多种loader options, 都不生效。比如:prependData, data, paths。 globalVars 可以生效,但是不能引入所有less全局配置文件。
The text was updated successfully, but these errors were encountered:
less-loader 还没发布支持 prependData 的新版本。
prependData
Sorry, something went wrong.
新版本不支持,老版本为啥也不好使呢?
webpack-contrib/less-loader#327 这个功能七天前才被实现,还没发布到 npm
逢升级cli,尴尬...
@sodatea less-loader 6x 已经发布了哦
No branches or pull requests
Version
4.2.0
Environment info
Steps to reproduce
What is expected?
全局注入Less全局变量配置
What is actually happening?
尝试了很多种loader options, 都不生效。比如:prependData, data, paths。
globalVars 可以生效,但是不能引入所有less全局配置文件。
The text was updated successfully, but these errors were encountered: