vue.js - vue-cli执行run build报错 ?
本文介绍了vue.js - vue-cli执行run build报错 ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
在vue代码加入<style>...</style>后 run build的时候报错
ERROR in ./~/.npminstall/extract-text-webpack-plugin/1.0.1/extract-text-webpack-
plugin/loader.js?{"omit":1,"extract":true,"remove":true}!./~/.npminstall/vue-sty
le-loader/1.0.0/vue-style-loader!./~/.npminstall/css-loader/0.23.1/css-loader?so
urceMap!./~/.npminstall/vue-loader/8.3.1/vue-loader/lib/style-rewriter.js!./~/.n
pminstall/vue-loader/8.3.1/vue-loader/lib/selector.js?type=style&index=0!./src/v
iews/Index.vue
Module build failed: Error: "extract-text-webpack-plugin" loader is used without
the corresponding plugin, refer to https://github.com/webpack/extract-text-webp
ack-plugin for the usage example
at Object.module.exports.pitch (D:\lwl\mydevcode\devtest\vuejs\project\node_
modules\.npminstall\extract-text-webpack-plugin\1.0.1\extract-text-webpack-plugi
n\loader.js:21:9)
@ ./src/views/Index.vue 2:0-346
这是我github上的代码,运行run build的时候有同样的问题
https://github.com/hofa/vue-st
解决方案
https://github.com/webpack/extract-text-webpack-plugin/issues/173 自己来了,看github,似乎在node 6.0.0 和 6.1.0都有这样的问题
换成 6.2.0 问题消失!
这篇关于vue.js - vue-cli执行run build报错 ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文