Closed funme closed 5 years ago
Describe the bug 想通过modifyVars修改less变量,编译报错
[ "import", { libraryName: "vant", libraryDirectory: "es", style: name => `${name}/style/less` }, "vant" ],
module.exports = { css: { loaderOptions: { less: { modifyVars: { red: "#03a9f4", blue: "#3eaf7c", orange: "#f08d49", "text-color": "#72add0" } } } } };
@import '../style/var'; @import '@vant/icons/src/index.less'; ^ Can't resolve './@vant/icons/src/index.less' in 'f:\projects\xyjz\xyjz_h5\node_modules\vant\es\icon' in f:\projects\xyjz\xyjz_h5\node_modules\vant\es\icon\index.less (line 2, column 0) @ ./node_modules/vant/es/style/base.less 4:14-194 14:3-18:5 15:22-202 @ ./node_modules/vant/es/cell/style/less.js @ ./src/plugins/vant.js @ ./src/plugins/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://172.16.8.236:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
Environment
版本降级 1.4.8 不报错
感谢反馈,后续会修复这个问题
已在 1.5.0-beta2 中修复
Describe the bug 想通过modifyVars修改less变量,编译报错
Environment
版本降级 1.4.8 不报错