Search Docs
CopyPluginOptions | CopyPluginOptions['patterns']
undefined
将指定的文件或目录拷贝到构建输出目录中,基于 rspack.CopyRspackPlugin 实现。
配置项请参考:rspack.CopyRspackPlugin。
将 ./src/assets 下的文件拷贝到 ./dist 目录:
./src/assets
./dist
export default { output: { copy: [ // `./src/assets/image.png` -> `./dist/image.png` { from: './src/assets' }, ], }, };
将 ./src/assets 下的文件拷贝到 ./dist/assets 目录:
./dist/assets
export default { output: { copy: [ // `./src/assets/image.png` -> `./dist/assets/image.png` { from: './src/assets', to: 'assets' }, ], }, };