14
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Last updated at Posted at 2018-11-12

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

Error | エラー

webpack で vue-loader を使用する際に以下のエラーが出ることがある。

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

Solution | 解決方法

webpack.config.js の plugins に VueLoaderPlugin の記述を追加する必要がる。

const { VueLoaderPlugin } = require("vue-loader");

module.exports = {
  plugins: [new VueLoaderPlugin()]
};

Supplement | 補足

vue-loader の使用方法

  1. インストール

    # using npm
    npm install vue-loader --save-dev
    
    # using yarn
    yarn add vue-loader --dev
    
  2. webpack.config.js への記述

    ※ entry, outputなどは適宜記述ください。 

    const { VueLoaderPlugin } = require("vue-loader");
    
    module.exports = {
      module: {
        rules: [
          {
            test: /\.vue$/,
            loader: "vue-loader"
          }
        ]
      },
      plugins: [new VueLoaderPlugin()]
    }
    
14
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?