Skip to content

Commit

Permalink
docs: perfect README.md for the UserOptions of viteNext (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryomahan committed Dec 26, 2023
1 parent ce23535 commit ad22da1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
19 changes: 12 additions & 7 deletions README.md
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
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

0 comments on commit ad22da1

Please sign in to comment.