rules: [ { test: /\.css$/, use: [{ loader: "style-loader" }, { loader: "css-loader" }] }, { test: /\.less$/, use: [{ loader: "style-loader" }, { loader: "css-loader" }, { loader: "less-loader" }] } ]WARNING in ./node_modules/css-loader!./node_modules/_less-loader@4.1.0@less-loader/dist/cjs.js!./node_modules/style-loader!./node_modules/css-loader!./node_modules/_less-loader@4.1.0@less-loader/dist/cjs.js!./src/routes/login/index.lessModule build failed:var content = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/_less-loader@4.1.0@less-loader/dist/cjs.js!./index.less"); ^Unrecognised input
2 回答
宝慕林4294392
TA贡献2021条经验 获得超8个赞
因为你提供的信息太少,我猜测是你执行build命令,因为文件引用less文件的时候出错了。正确的方式是
<style rel="stylesheet/less">
@import '../../../less/XXX.less';
</style>
添加回答
举报
0/150
提交
取消