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

打包运行时如有报错

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

报错信息

说明vue-loader版本过高:

  1. 可以将版本调制14,
npm uninstall vue-loader	//删除vue-loader

 npm install vue-leader@14.2.2	//安装14.2.2版本的vue-loader

也可直接在package.json配置文件中直接修改,修改后再执行npm install进行更新

  1. 也可以在webpack配置文件中添加:
const VueLoaderPlugin = require('vue-loader/lib/plugin')

plugins:[
    new VueLoaderPlugin()
]
Logo

前往低代码交流专区

更多推荐