iview框架,npm run dev报错:error in .
使用iview框架,npm run dev报错:
error in ./src/index.less
Module build failed (from ./node_modules/less-loader/dist/cjs.js):
// https://github.com/ant-design/ant-motion/issues/44
.bezierEasingMixin();
^
Inline JavaScript is not enabled. Is it set in your options?
in D:\CODE\gdfront\node_modules\iview\src\styles\color\bezierEasing.less (
line 110, column 0)
@ ./src/index.less 4:14-216 14:3-18:5 15:22-224
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8081/sockjs-node (webpack)
/hot/dev-server.js ./src/main.js
报错解决方法,参考https://github.com/ant-design/ant-motion/issues/44:
找到vue.config.js文件,没有vue.config.js的话新建,添加下面代码:
module.exports = { css: { loaderOptions: { less: { javascriptEnabled: true, } } },}