Skip to content

Commit ad22da1

Browse files
authored
docs: perfect README.md for the UserOptions of viteNext (#139)
1 parent ce23535 commit ad22da1

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ export default defineConfig({
8282
},
8383
],
8484
},
85+
/**
86+
* 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
87+
*/
88+
viteNext: false,
8589
}),
8690
],
8791
})
@@ -150,13 +154,14 @@ export default defineConfig({
150154

151155
### UserOptions
152156

153-
| Parameter | Types | Default | Description |
154-
| --------- | ------------------------ | ------------- | ----------------------------- |
155-
| entry | `string` | `src/main.ts` | entry file path |
156-
| template | `string` | `index.html` | relative path to the template |
157-
| inject | `InjectOptions` | - | Data injected into HTML |
158-
| minify | `boolean|MinifyOptions` | - | whether to compress html |
159-
| pages | `PageOption` | - | Multi-page configuration |
157+
| Parameter | Types | Default | Description |
158+
| --------- | ------------------------ | ------------- | ------------------------------------------------- |
159+
| entry | `string` | `src/main.ts` | entry file path |
160+
| template | `string` | `index.html` | relative path to the template |
161+
| inject | `InjectOptions` | - | Data injected into HTML |
162+
| minify | `boolean|MinifyOptions` | - | whether to compress html |
163+
| pages | `PageOption` | - | Multi-page configuration |
164+
| viteNext | `boolean` | false | set to true to support the latest version of vite |
160165

161166
### InjectOptions
162167

README.zh_CN.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ export default defineConfig({
8484
},
8585
],
8686
},
87+
/**
88+
* 如果你使用的 vite 版本高于 5.0.0-beta.13,可以将 viteNext 设置为 true 来进行兼容
89+
*/
90+
viteNext: false,
8791
}),
8892
],
8993
})
@@ -152,13 +156,14 @@ export default defineConfig({
152156

153157
### UserOptions
154158

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

163168
### InjectOptions
164169

0 commit comments

Comments
 (0)