Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: perfect README.md for the UserOptions of viteNext #139

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export default defineConfig({
},
],
},
/**
* If you are using vite that version higher than 5.0.0-beta.13, you can set viteNext to true to align vite's config
*/
viteNext: false,
}),
],
})
Expand Down Expand Up @@ -150,13 +154,14 @@ export default defineConfig({

### UserOptions

| Parameter | Types | Default | Description |
| --------- | ------------------------ | ------------- | ----------------------------- |
| entry | `string` | `src/main.ts` | entry file path |
| template | `string` | `index.html` | relative path to the template |
| inject | `InjectOptions` | - | Data injected into HTML |
| minify | `boolean|MinifyOptions` | - | whether to compress html |
| pages | `PageOption` | - | Multi-page configuration |
| Parameter | Types | Default | Description |
| --------- | ------------------------ | ------------- | ------------------------------------------------- |
| entry | `string` | `src/main.ts` | entry file path |
| template | `string` | `index.html` | relative path to the template |
| inject | `InjectOptions` | - | Data injected into HTML |
| minify | `boolean|MinifyOptions` | - | whether to compress html |
| pages | `PageOption` | - | Multi-page configuration |
| viteNext | `boolean` | false | set to true to support the latest version of vite |

### InjectOptions

Expand Down
19 changes: 12 additions & 7 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export default defineConfig({
},
],
},
/**
* 如果你使用的 vite 版本高于 5.0.0-beta.13,可以将 viteNext 设置为 true 来进行兼容
*/
viteNext: false,
}),
],
})
Expand Down Expand Up @@ -152,13 +156,14 @@ export default defineConfig({

### UserOptions

| 参数 | 类型 | 默认值 | 说明 |
| -------- | ------------------------ | ------------- | ---------------- |
| entry | `string` | `src/main.ts` | 入口文件 |
| template | `string` | `index.html` | 模板的相对路径 |
| inject | `InjectOptions` | - | 注入 HTML 的数据 |
| minify | `boolean|MinifyOptions` | - | 是否压缩 html |
| pages | `PageOption` | - | 多页配置 |
| 参数 | 类型 | 默认值 | 说明 |
| -------- | ------------------------ | ------------- | ------------------------------- |
| entry | `string` | `src/main.ts` | 入口文件 |
| template | `string` | `index.html` | 模板的相对路径 |
| inject | `InjectOptions` | - | 注入 HTML 的数据 |
| minify | `boolean|MinifyOptions` | - | 是否压缩 html |
| pages | `PageOption` | - | 多页配置 |
| viteNext | `boolean` | false | 用于开启是否兼容最新版本的 vite |

### InjectOptions

Expand Down
Loading