Webpack 使用copy-webpack-plugin拷贝文件或目录修改最终输出路径的配置

it2022-05-05  122

例如不需要原路径中的public路径:

new CopyWebpackPlugin([{ from: './public/**/*.png', to: path.resolve(__dirname , 'build'), transformPath(targetPath, absolutePath) { return targetPath.replace('public', '') }, toType: 'dir' }])

 


最新回复(0)