小编sdw*_*zhy的帖子

vue-loader:如何在Webpack 4和vue-cli3中使用vue-loader v15

我使用vue-cli3 webpack4vue-loader v15,它们都是最新的;

我想配置vue-loader,但这是一个错误; Error: [VueLoaderPlugin Error] No matching use for vue-loader is found. Make sure the rule matching .vue files include vue-loader in its use. vue.config.js

const HtmlWebpackPlugin = require("html-webpack-plugin");
const VueLoaderPlugin = require("vue-loader/lib/plugin");
module.exports = {
    productionSourceMap: false,
    baseUrl: "./",
    configureWebpack: {
        module: {
            rules: [{
                test: /\.vue$/,
                loader: "vue-loader"
            }]
        },
        plugins: [
            new VueLoaderPlugin()
        ]
    }
}
Run Code Online (Sandbox Code Playgroud)

package.js```

 "dependencies": {
    "awe-dnd": "^0.3.1",
    "axios": "^0.18.0",
    "iview": "^3.1.5",
    "lodash": "^4.17.11",
    "vue": "^2.5.17",
    "vue-router": "^3.0.2" …
Run Code Online (Sandbox Code Playgroud)

webpack vue-loader

5
推荐指数
1
解决办法
1981
查看次数

标签 统计

vue-loader ×1

webpack ×1