output.copy
- Type:
Rspack.CopyRspackPluginOptions | Rspack.CopyRspackPluginOptions['patterns'] - Default:
undefined
Copies the specified file or directory to the dist directory, implemented based on rspack.CopyRspackPlugin.
Please refer to the configuration options here: rspack.CopyRspackPlugin.
Example
Copy files from ./src/assets to the ./dist directory:
rsbuild.config.ts
Copy files from ./src/assets to the ./dist/assets directory:
rsbuild.config.ts
When copying files from the public directory to the dist directory during a production build, the public/someDir directory will be ignored:
rsbuild.config.ts

