You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copies the specified file or directory to the dist directory, implemented based on [rspack.CopyRspackPlugin](https://rspack.rs/plugins/rspack/copy-rspack-plugin).
Copy file name to clipboardExpand all lines: website/docs/en/guide/basic/configure-rslib.mdx
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ export default {
62
62
};
63
63
```
64
64
65
-
Rslib will generate the [environments](https://rsbuild.rs/config/environments) configuration of Rsbuild internally, please refer to [Configuration Debug](#configuration-debug) to view the final generated configuration.
65
+
Rslib will generate the [environments](https://rsbuild.rs/config/environments) configuration of Rsbuild internally, you can run [rslib inspect](/guide/basic/cli#rslib-inspect) command to view the final generated configuration.
66
66
67
67
You can also refer to the [Configuration Overview](/config/) page to view the detailed introduction of all configurations.
68
68
@@ -203,15 +203,15 @@ Rslib is built on top of Rsbuild and Rsbuild supports directly modifying the Rsp
203
203
204
204
For more details, refer to [Configure Rspack](https://rsbuild.rs/guide/basic/configure-rspack).
205
205
206
-
## Configuration debug
206
+
## Debug mode
207
207
208
-
You can enable Rslib's debug mode by adding the `DEBUG=rsbuild` environment variable when executing a build. It will display the final Rsbuild/Rspack configuration after processing by Rslib.
208
+
You can add the `DEBUG=rsbuild` environment variable when building to enable Rslib's debug mode.
209
209
210
210
```bash
211
211
DEBUG=rsbuild pnpm build
212
212
```
213
213
214
-
In debug mode, Rslib will write the Rsbuild / Rspack config to the dist directory, which is convenient for developers to view and debug.
214
+
In debug mode, Rslib will output additional log information and write the final Rsbuild config and Rspack config after processing by Rslib to the output directory, making it convenient for developers to view and debug.
215
215
216
216
Here is an example of a library that sets both CJS and ESM formats:
217
217
@@ -222,9 +222,11 @@ Inspect config succeed, open following files to view the content:
0 commit comments