1、我的项目中copy-webpack-plugin的版本是"^6.0.3"
2、以下是我的代码
new CopyWebpackPlugin({
patterns: [
{
from: "public/js/*.js",
to: path.resolve(__dirname, "dist", "js"),
flatten: true,
globOptions: {
ignore: ["other.js"],
},
},
],
}),
打包之后,dist下面的js文件夹中依然有other.js,请问哪位大佬知道是什么原因吗?
试试 '**/other.js'