1

I'm trying to configure MiniCssExtractPlugin but there's an error after i run it: ERROR in ./src/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: Cannot read property 'bindings' of null.

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

module.exports = {
    entry: './src/index.js',

    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'bundle.js'
    },

    plugins: [
        new MiniCssExtractPlugin({
          filename: 'style.css',
        }),
    ], 

    module: {
        rules: [
          {
            test: /\.js$/,
            exclude: [/node_modules/],
            use: {
              loader: 'babel-loader'
            },
          },
          {
            test: /\.css$/, 
            use: [
              {
                loader: MiniCssExtractPlugin.loader,
              },

              'css-loader',
            ],
          },
        ],
    },
};
user-9725874
  • 831
  • 9
  • 15
  • Did you solve your issue in the meantime?`I have a [similar issue](https://stackoverflow.com/questions/57974434/error-cannot-read-property-bindings-of-null-when-trying-to-compile-react-pro) (and I am not sure by which loader it is caused). Maybe you could share your `package.json` with us? – B--rian Sep 23 '19 at 08:50

0 Answers0