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
## How to preserve all comments in the output files?
4
+
5
+
By default, Rslib uses SWC to remove comments. The corresponding SWC [jsc.minify.format](https://swc.rs/docs/configuration/minification#jscminifyformat) configuration is
6
+
7
+
```js
8
+
{
9
+
comments:'some', //
10
+
preserveAnnotations:true,
11
+
}
12
+
```
13
+
14
+
This will only preserve some legal comments and annotations. If you want to preserve all comments, you can refer to the following configuration
15
+
16
+
```ts title="rslib.config.ts"
17
+
exportdefault {
18
+
output: {
19
+
minify: {
20
+
jsOptions: {
21
+
minimizerOptions: {
22
+
format: {
23
+
comments: 'all', // This will preserve all comments
0 commit comments