VueLoaderPlugin Error: No matching use for vue-loader is found

前端 未结 2 2638
轻奢々
轻奢々 2021-02-20 08:34

I am using webpack within a Laravel Mix project. When my webpack.config.js looks like this, Webpack works without error:

module.exports = {
    module: {
                


        
相关标签:
2条回答
  • 2021-02-20 09:11

    How about rewriting the import in your config file to:
    const { VueLoaderPlugin } = require("vue-loader");

    0 讨论(0)
  • 2021-02-20 09:19

    The Laravel mix setup of yours already loads the VueLoaderPlugin implicitly, so reloading it again causes this error.

    From reading their docs, it written that they support .vue file compilation without extra configuration.

    If you're still not convinced, check out their internal web pack configuration: https://www.github.com/JeffreyWay/laravel-mix/tree/master/src%2Fcomponents%2FVue.js and notice the use of VueLoaderPlugin.

    0 讨论(0)
提交回复
热议问题