Skip to content

Commit a29f15d

Browse files
committed
docs: fix all conflicts.
1 parent 420840a commit a29f15d

File tree

3 files changed

+10
-25
lines changed

3 files changed

+10
-25
lines changed

.vitepress/theme/custom.css

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
.release-tag {
4242
font-size: 20px;
4343
font-weight: bold;
44-
font-family: monospace;
4544
display: inline-block;
4645
position: absolute;
4746
top: 50%;

config/index.md

+6-16
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,7 @@ export default async ({ command, mode }) => {
367367

368368
- **类型:** `boolean | string`
369369

370-
<<<<<<< HEAD
371-
在开发服务器启动时自动在浏览器中打开应用程序。当此值为字符串时,会被用作 URL 的路径名。
372-
=======
373-
Automatically open the app in the browser on server start. When the value is a string, it will be used as the URL's pathname. If you want to open the server in a specific browser you like, you can set the env `process.env.BROWSER` (e.g. `firefox`). See [the `open` package](https://github.com/sindresorhus/open#app) for more details.
374-
>>>>>>> 366b04d83f84601eac5039d1d7c5c4483a4a9a87
370+
在开发服务器启动时自动在浏览器中打开应用程序。当此值为字符串时,会被用作 URL 的路径名。若你想指定喜欢的浏览器打开服务器,你可以设置环境变量 `process.env.BROWSER`(例如:`firefox`)。查看 [这个 `open`](https://github.com/sindresorhus/open#app) 获取更多细节。
375371

376372
**示例:**
377373

@@ -520,9 +516,7 @@ createServer()
520516
server: {
521517
fs: {
522518
// 可以为项目根目录的上一级提供服务
523-
allow: [
524-
'..'
525-
]
519+
allow: ['..']
526520
}
527521
}
528522
}
@@ -617,17 +611,13 @@ createServer()
617611

618612
传递给 [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs) 插件的选项。
619613

620-
<<<<<<< HEAD
621-
### build.lib {#build-lib}
622-
=======
623-
### build.dynamicImportVarsOptions
614+
### build.dynamicImportVarsOptions {#build-dynamicimportvarsoptions}
624615

625-
- **Type:** [`RollupDynamicImportVarsOptions`](https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#options)
616+
- **类型:** [`RollupDynamicImportVarsOptions`](https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#options)
626617

627-
Options to pass on to [@rollup/plugin-dynamic-import-vars](https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars).
618+
传递给 [@rollup/plugin-dynamic-import-vars](https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars) 的选项。
628619

629-
### build.lib
630-
>>>>>>> 366b04d83f84601eac5039d1d7c5c4483a4a9a87
620+
### build.lib {#build-lib}
631621

632622
- **类型:** `{ entry: string, name?: string, formats?: ('es' | 'cjs' | 'umd' | 'iife')[], fileName?: string }`
633623
- **相关内容:** [库模式](/guide/build#library-mode)

guide/env-and-mode.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Vite 在一个特殊的 **`import.meta.env`** 对象上暴露环境变量。这
66

77
- **`import.meta.env.MODE`**: {string} 应用运行的[模式](#模式)
88

9-
- **`import.meta.env.BASE_URL`**: {string} 部署应用时的基本URL。他由[`base` 配置项](/config/#base)决定。
9+
- **`import.meta.env.BASE_URL`**: {string} 部署应用时的基本 URL。他由[`base` 配置项](/config/#base)决定。
1010

1111
- **`import.meta.env.PROD`**: {boolean} 应用是否运行在生产环境。
1212

@@ -24,11 +24,7 @@ Vite 在一个特殊的 **`import.meta.env`** 对象上暴露环境变量。这
2424

2525
## `.env` 文件 {#env-files}
2626

27-
<<<<<<< HEAD
28-
Vite 使用 [dotenv](https://github.com/motdotla/dotenv) 从你的 [环境目录](/config/#envDir) 中的下列文件加载额外的环境变量:
29-
=======
30-
Vite uses [dotenv](https://github.com/motdotla/dotenv) to load additional environment variables from the following files in your [environment directory](/config/#envdir):
31-
>>>>>>> 366b04d83f84601eac5039d1d7c5c4483a4a9a87
27+
Vite 使用 [dotenv](https://github.com/motdotla/dotenv) 从你的 [环境目录](/config/#envdir) 中的下列文件加载额外的环境变量:
3228

3329
```
3430
.env # 所有情况下都会加载
@@ -50,14 +46,14 @@ VITE_SOME_KEY=123
5046

5147
:::warning 安全注意事项
5248

53-
- `.env.*.local` 文件应是本地的,可以包含敏感变量。你应该将 `.local` 添加到你的 `.gitignore` 中,以避免它们被git检入
49+
- `.env.*.local` 文件应是本地的,可以包含敏感变量。你应该将 `.local` 添加到你的 `.gitignore` 中,以避免它们被 git 检入
5450

5551
- 由于任何暴露给 Vite 源码的变量最终都将出现在客户端包中,`VITE_*` 变量应该不包含任何敏感信息。
5652
:::
5753

5854
### 智能提示 {#intellisense}
5955

60-
默认情况下,Vite为 `import.meta.env` 提供了类型定义。随着在 `.env[mode]` 文件中自定义了越来越多的环境变量,你可能想要在代码中获取这些以 `VITE_` 为前缀的用户自定义环境变量的 TypeScript 智能提示。
56+
默认情况下,Vite 为 `import.meta.env` 提供了类型定义。随着在 `.env[mode]` 文件中自定义了越来越多的环境变量,你可能想要在代码中获取这些以 `VITE_` 为前缀的用户自定义环境变量的 TypeScript 智能提示。
6157

6258
要想做到这一点,你可以在 `src` 目录下创建一个 `env.d.ts` 文件,接着按下面这样增加 `ImportMetaEnv` 的定义:
6359

0 commit comments

Comments
 (0)