chore: update docs

This commit is contained in:
bluwy 2024-11-04 14:50:22 +08:00
parent 744eea4d77
commit ac5b6ea02e

View File

@ -190,7 +190,25 @@ export default defineConfig({
- **Type:** `boolean | string` - **Type:** `boolean | string`
- **Default:** `false` - **Default:** `false`
When set to `true`, the build will also generate a `.vite/license.md` file that includes all bundled dependencies' licenses. It can be hosted to display and acknowledge the dependencies used by the app. When the value is a string, it will be used as the license file name. When set to `true`, the build will also generate a `.vite/license.md` file that includes all bundled dependencies' licenses. It can be hosted to display and acknowledge the dependencies used by the app. When the value is a string, it will be used as the license file name. An example output may look like this:
```md
# Licenses
The app bundles dependencies which contains the following licenses:
## dep-1 - 1.2.3 (CC0-1.0)
CC0 1.0 Universal
...
## dep-2 - 4.5.6 (MIT)
MIT License
...
```
If a string is passed that ends with `.json`, a raw JSON file will be generated instead. For example: If a string is passed that ends with `.json`, a raw JSON file will be generated instead. For example:
@ -198,15 +216,15 @@ If a string is passed that ends with `.json`, a raw JSON file will be generated
[ [
{ {
"name": "dep-1", "name": "dep-1",
"version": "0.0.0", "version": "1.2.3",
"identifier": "CC0-1.0", "identifier": "CC0-1.0",
"text": "CC0 1.0 Universal ..." "text": "CC0 1.0 Universal\n\n..."
}, },
{ {
"name": "dep-2", "name": "dep-2",
"version": "0.0.0", "version": "4.5.6",
"identifier": "MIT", "identifier": "MIT",
"text": "MIT License ..." "text": "MIT License\n\n..."
} }
] ]
``` ```