新建 Vue项目 使用iView报错解决

错误如下:

 error  in ./src/index.less

Module build failed: 

// https://github.com/ant-design/ant-motion/issues/44
.bezierEasingMixin();
^
Inline JavaScript is not enabled. Is it set in your options?
      in E:\eWebStormWorkspace\workspace\works\dev-project-front\node_modules\_iview@3.1.3@iview\src\styles\color\bezierEasing.less (line 110, column 0)

 @ ./src/index.less 4:14-208 13:3-17:5 14:22-216
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://localhost:7073 webpack/hot/dev-server ./src/main.js

 

 

解决:

build -> utils.js

  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
  return {
    css: generateLoaders(),
    postcss: generateLoaders(),
    less: generateLoaders('less',{ javascriptEnabled: true }),
    sass: generateLoaders('sass', { indentedSyntax: true }),
    scss: generateLoaders('sass'),
    stylus: generateLoaders('stylus'),
    styl: generateLoaders('stylus')
  }

 

 

 

 

 

posted @ 2018-10-23 10:24  cralor  阅读(904)  评论(0编辑  收藏  举报