vue-cil安装后运行npm run dev报错

如题,我按照各种教程尝试过安装vue-cil无数次了,每次启动都是报错插件"extract-text-webpack-plugin"

错误报告里面@出来的位置我也没看见有用过这个插件的语法啊

完整的错误报告在这里:

error  in ./src/App.vue

Module build failed: Error: "extract-text-webpack-plugin" loader is used without the
corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin
 for the usage example
    at Object.module.exports.pitch (F:\vue2\node_modules\extract-text-webpack-plugin\
loader.js:25:9)

 @ ./src/App.vue 2:2-371
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/components/Hello.vue

Module build failed: Error: "extract-text-webpack-plugin" loader is used without the

corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin
 for the usage example
    at Object.module.exports.pitch (F:\vue2\node_modules\extract-text-webpack-plugin\
loader.js:25:9)

 @ ./src/components/Hello.vue 2:2-381
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

main.js在这里

import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})
阅读 4.6k
3 个回答

run dev
我这几天也在写一个vue项目,上面是个博客,记录了一些遇到的问题。可以参考一下哈

可将build\dev-server.js中对应部分改为

// if (!process.env.NODE_ENV) {
  process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
// }
//去掉if判断,使process.env.NODE_ENV只能从配置文件中读取

可以把webpack的配置文件贴出来看看

webpack的 dev时候的配置文件粘出来,

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题