vue-loader was used without the corresponding plugin

安装: cnpm i vue-loader vue-template-compiler -D后报错如下:
在这里插入图片描述
解决方案:

//引入插件
const VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
    entry: path.join(__dirname, './src/main.js'),
    output: {
        path: path.join(__dirname, './dist'),
        filename: 'bundle.js'//指定输出文件的名称
    },
    plugins: [
        new VueLoaderPlugin()
    ]
}

猜你喜欢

转载自blog.csdn.net/qq_15769147/article/details/88541749