Error: parameters / request are provided without bootloader. Webpack 2.2.0-rc.3

I updated webpack from rc2 to rc3, and since then I can not start my project using npm start I get this error

> webpack-dev-server Error: options/query provided without loader (use loader + options) in { "test": {}, "exclude": {}, "use": "file-loader", "query": { "name": "[name].[ext]" } } 

Here is my configuration

  module: { rules: [ { test: /\.html$/, exclude: /node_modules/, use: 'file-loader', query: { name: '[name].[ext]', }, }, { test: /\.s?css$/, exclude: /node_modules/, use: [ 'style-loader', { loader: 'css-loader', options: { importLoaders: 1, modules: true, localIdentName: '[name]__[local]_[hash:base64:5]', }, }, 'sass-loader', 'sass-resources-loader', 'postcss-loader', ], query: { modules: true, }, }, { test: /\.jsx?$/, exclude: /node_modules/, use: [ 'babel-loader', ], }, ], }, 

Rollback to rc2 does not resolve the issue. I believe the problem is in rc3 because I have another project that had rc2 and could start. It broke right after upgrading webpack to rc3

+7
webpack-2
source share
1 answer

You need to edit your config because Webpack 2 has changed its layout for declaring bootloaders.

Reorganize this part:

 { test: /\.html$/, exclude: /node_modules/, use: 'file-loader', query: { name: '[name].[ext]', }, }, 

:

 { test: /\.html$/, exclude: /node_modules/, use: [ { loader: 'file-loader', query: { name: '[name].[ext]' } } ] }, 

Apply this conversion to the other loaders you declare and they should work :)

+11
source share

All Articles