"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?
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
Most helpful comment
n/m PEBKAC — I was adding the plugin in
resolve.pluginsinstead ofplugins.