O
O
Ostap Bellik2021-05-30 16:21:46
JavaScript
Ostap Bellik, 2021-05-30 16:21:46

How to fix Module build failed (from ../node_modules/mini-css-extract-plugin/dist/loader.js)?

I made an environment for js, then connected MiniCssExtractPlugin and got an error: Module build failed (from ../node_modules/mini-css-extract-plugin/dist/loader.js):
ValidationError: Invalid options object. Mini CSS Extract Plugin Loader has been initialized usich the API schema.
- options has an unknown property 'reloadAll'. These properties are valid:
object { publicPath?, emit?, esModule?, layer?, modules? }
at validate (C:\Users\Ostap\Desktop\site2\node_modules\schema-utils\dist\validate.js:104:11)
at Object.pitch (C:\Users\Ostap\Desktop\site2\node_modules\mini -css-extract-plugin\dist\load @ ./index.js 2:0-27

Here is the code:
Webpack config js

const MiniCssExtractPlugin = require('mini-css-extract-plugin')

use: [
              {
                loader: MiniCssExtractPlugin.loader,
                options: {
                  hmr: isDev,
                  reloadAll: true
                }
              }, 
              "css-loader",
              "sass-loader",
            ]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question