Closed liuqz closed 6 years ago
less-loader添加 {javascriptEnabled: true}
@vue/cli 3.0创建的项目,增加less-loader仍然不起作用,依然报错 vue.config.js
module.export = {
productionSourceMap: false,
css: {
loaderOptions: {
less: {
javascriptEnabled: true
}
}
}
}
增加这个文件后,还是报上面那个错误
如何修改Ant Design of Vue主题色? - 择卡的回答 - 知乎 https://www.zhihu.com/question/284811056/answer/440370119
你这个回答是针对vue-cli 2.X的,vue-cli 3.x的配置文件变了,没有build/utils.js这个目录的配置了,只能通过vue.config.js或package.json配置。
是我错了,module.exports少写了个s。谢谢!
1.在vue.config.js文件里配置 module.export = { css: { loaderOptions: { less: { javascriptEnabled: true } } } } 2.降低vue-cli 版本号
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Version
0.7.0
Environment
archlinux X64, chromium 67, Vue 2.5.16, less 3.0.4, less-loader 4.1.0
Reproduction link
http://localhost:8080
Steps to reproduce
yarn serve 就报错
What is expected?
引用less文件,覆写样式
What is actually happening?
引用就报错