vueloader报错

xiaoxiao2021-02-28  16

阅读数:413

为了引入.vue文件,安装完vue-loader和vue-template-compiler后,运行报错:

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

百度了一下,是因为vue-loader,15的版本需要再添加plugin的配置。有两种解决方法:

1.把安装版本改为14的

2.在webpack.config.js中添加:

const { VueLoaderPlugin } = require('vue-loader') module.exports = { // ... plugins: [ new VueLoaderPlugin() ] }
转载请注明原文地址: https://www.6miu.com/read-2629669.html

最新回复(0)