Skip to content

Commit b02b07c

Browse files
authored
docs: update outputOptions.comments to legalComments (#702)
1 parent 78efddf commit b02b07c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/advanced/rolldown-options.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ import { defineConfig } from 'tsdown'
5757

5858
export default defineConfig({
5959
outputOptions: {
60-
comments: 'preserve-legal',
60+
legalComments: 'inline',
6161
},
6262
})
6363
```
6464

65-
In this example, the `comments: 'preserve-legal'` option ensures that legal comments (e.g., license headers) are preserved in the output files.
65+
In this example, the `legalComments: 'inline'` option ensures that legal comments (e.g., license headers) are preserved in the output files.
6666

6767
### Using a Function
6868

@@ -74,7 +74,7 @@ import { defineConfig } from 'tsdown'
7474
export default defineConfig({
7575
outputOptions(outputOptions, format) {
7676
if (format === 'esm') {
77-
outputOptions.comments = 'preserve-legal'
77+
outputOptions.legalComments = 'inline'
7878
}
7979
return outputOptions
8080
},

docs/zh-CN/advanced/rolldown-options.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ import { defineConfig } from 'tsdown'
5757

5858
export default defineConfig({
5959
outputOptions: {
60-
comments: 'preserve-legal',
60+
legalComments: 'inline',
6161
},
6262
})
6363
```
6464

65-
在此示例中,`comments: 'preserve-legal'` 选项确保法律注释(例如许可证头部)会保留在输出文件中。
65+
在此示例中,`legalComments: 'inline'` 选项确保法律注释(例如许可证头部)会保留在输出文件中。
6666

6767
### 使用函数
6868

@@ -74,7 +74,7 @@ import { defineConfig } from 'tsdown'
7474
export default defineConfig({
7575
outputOptions(outputOptions, format) {
7676
if (format === 'esm') {
77-
outputOptions.comments = 'preserve-legal'
77+
outputOptions.legalComments = 'inline'
7878
}
7979
return outputOptions
8080
},

0 commit comments

Comments
 (0)