Closed liuzhuan closed 4 years ago
If we install the latest clean-webpack-plugin, which is v3.0.0 now. And we require its default export, such as:
clean-webpack-plugin
const CleanWebpackPlugin = require("clean-webpack-plugin");
We would get a error:
TypeError: HtmlWebpackPlugin is not a constructor ...
Because the default export has been replaced with named export in this commit.
So we should change the require method a little, just for v3.0.0+:
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
Thanks, I'll fix for the next revision.
Done at dev. Sorry for the delay!
dev
If we install the latest
clean-webpack-plugin
, which is v3.0.0 now. And we require its default export, such as:We would get a error:
Because the default export has been replaced with named export in this commit.
So we should change the require method a little, just for v3.0.0+: