iview框架,npm run dev报错:error in .

2019-04-10  本文已影响0人  土豆特别想爬山

使用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, } } },}

上一篇下一篇

猜你喜欢

热点阅读