Make sure to include VueLoaderPlugin

weixin_34138139發表於2019-03-07

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

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

方法

在webpack.config.js中加入

const VueLoaderPlugin = require('vue-loader/lib/plugin');

module.exports = {
......
plugins: [
        // make sure to include the plugin for the magic
        new VueLoaderPlugin()
],
}

相關文章