Mini-css-extract-plugin: webpack-cli v3 -> Cannot read property 'tap' of undefined

Created on 6 Aug 2018  Â·  3Comments  Â·  Source: webpack-contrib/mini-css-extract-plugin

"webpack-cli": "^3.1.0"
**TypeError: Cannot read property 'tap' of undefined**
"webpack-cli": "^2.0.13"
**is ok**
//webpack.config.js
const webpack = require("webpack");
const MiniCss = require("mini-css-extract-plugin");

module.exports = {
  entry: "./index.js",
  output: {
    filename: "index.js"
  },
  mode: "production",
  plugins: [new MiniCss({})],
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [MiniCss.loader, "css-loader"]
      }
    ]
  }
};

Why is that?

Most helpful comment

n/m PEBKAC — I was adding the plugin in resolve.plugins instead of plugins.

All 3 comments

I have this issue too, tested with webpack-cli@latest (3.1.0). Downgrading to webpack-cli 2.x has no effect.

n/m PEBKAC — I was adding the plugin in resolve.plugins instead of plugins.

You use old version of webpack, looks you install webpack globally

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mike1808 picture mike1808  Â·  3Comments

elgs picture elgs  Â·  3Comments

stavalfi picture stavalfi  Â·  4Comments

skrobek picture skrobek  Â·  4Comments

grrowl picture grrowl  Â·  3Comments