Type 'CleanWebpackPlugin' is not assignable to type '((this: Compiler, compiler: Compiler) => void)
thisVioletHydra opened this issue · comments
Roman commented
Issue description or question
Type 'CleanWebpackPlugin' is not assignable to type '((this: Compiler, compiler: Compiler) => void) | WebpackPluginInstance'.
Type 'CleanWebpackPlugin' is not assignable to type 'WebpackPluginInstance'.
Types of property 'apply' are incompatible.
Type '(compiler: import("c:/FRONTEND/www/group-dashboard/group-dashboard-postman/node_modules/clean-webpack-plugin/node_modules/@types/webpack/index").Compiler) => void' is not assignable to type '(compiler: import("c:/FRONTEND/www/group-dashboard/group-dashboard-postman/node_modules/webpack/types").Compiler) => void'.
Types of parameters 'compiler' and 'compiler' are incompatible.
Type 'Compiler' is missing the following properties from type 'Compiler': _pluginCompat, _plugins, plugin, apply, and 17 more.
Webpack Config
// paste your webpack config here
Environment
Run: npx envinfo --system --binaries --npmPackages clean-webpack-plugin,webpack
# Paste the result here
Roman commented
I removed depricated plugins and it worked! ☝🏾👍🏾