vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config

在webpack配置时,出现以下错误:

原因:

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

解决方法:

 在webpack.config.js 中,加入如下配置即可:

const VueLoaderPlugin = require('vue-loader/lib/plugin');
plugins:[
		new VueLoaderPlugin(),
		
	],

猜你喜欢

转载自www.cnblogs.com/Super-scarlett/p/12304375.html