执行npm run build 报:vue-loader was used without the corresponding plugin.

执行npm run build 报:vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.

Vue-loader在15.*之后的版本都是 vue-loader的使用都是需要伴生 VueLoaderPlugin的

加:

const VueLoaderPlugin = require('vue-loader/lib/plugin')
plugins:[
         new VueLoaderPlugin() //new一个实例
    ], 
image.png

官方参考文档:
https://vue-loader.vuejs.org/migrating.html#notable-breaking-changes

image.png

你可能感兴趣的:(执行npm run build 报:vue-loader was used without the corresponding plugin.)