我copy-webpack-plugin
从升级4.6.0
到6.0.2
我改变了我的代码
plugins: [
new CopyWebpackPlugin([{
from: clientAssetPath,
to: paths.STATICS,
ignore: [ '.gitkeep' ],
}], {
debug: 'info'
}),
new HtmlWebpackPlugin({
...htmlPluginOptions,
}),
new DynamicCDNWebpackPlugin({
resolver: unpkgResolver,
}),
]
到
plugins: [
new CopyPlugin([{
patterns: [{
from: clientAssetPath,
to: paths.STATICS,
noErrorOnMissing: true
}]
}]),
new HtmlWebpackPlugin({
...htmlPluginOptions,
}),
new DynamicCDNWebpackPlugin({
resolver: unpkgResolver,
}),
]
正如官方网站上给出的
但它开始抛出以下错误:
compilation.getLogger is not a function
当我调试它时,我发现错误来自node_modules/copy-webpack-plugin/dist/index.js
不知道是什么问题