We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e366605 + b433f3d commit 2f6b04cCopy full SHA for 2f6b04c
1 file changed
config/build-options.md
@@ -223,6 +223,30 @@ export default defineConfig({
223
]
224
```
225
226
+::: tip
227
+
228
+如果你想在构建后的代码中引用许可文件,可以使用 `build.rolldownOptions.output.postBanner` 在文件顶部注入注释。例如:
229
230
+<!-- TODO: add a link for output.postBanner above to Rolldown's documentation -->
231
232
+```js twoslash [vite.config.js]
233
+import { defineConfig } from 'vite'
234
235
+export default defineConfig({
236
+ build: {
237
+ license: true,
238
+ rolldownOptions: {
239
+ output: {
240
+ postBanner:
241
+ '/* See licenses of bundled dependencies at https://example.com/license.md */',
242
+ },
243
244
245
+})
246
+```
247
248
+:::
249
250
## build.manifest {#build-manifest}
251
252
- **类型:** `boolean | string`
0 commit comments