1
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でビルドしようとした時に出たエラーでハマったとこ

Last updated at Posted at 2019-10-07

webpackでビルドしようとした時に

Error: options/query provided without loader (use loader + options) in {
  "test": {},
  "use": [
    {
      "loader": "babel-loader"
    }
  ],
  "options": {
    "presets": [
      "@babel/preset-env"
    ]
  }
}

と出た時の解消にちょっとハマりかけたのでメモ

解決方法

webpack.config.js
{
test: /\.js$/,
use: [
  {
    loader: "babel-loader",
    query: {
      presets: [
        "@babel/preset-env"
      ]
    }
  }
]
}

色々と調べてみたら、こう書いたら一応解消はできた。
正しいかどうかはわからないけど、ひとまず。

1
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
1
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?