The correct one is to use this import:
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
And then instead of passing an array with the distribution folder, change it to
plugins: [
new CleanWebpackPlugin(),
//...
]
The correct one is to use this import:
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
And then instead of passing an array with the distribution folder, change it to
plugins: [
new CleanWebpackPlugin(),
//...
]