docs: fix typo of env demo (#8129)

closed #8125
This commit is contained in:
陆伯言
2026-07-08 08:38:06 +08:00
committed by GitHub
parent 75c3a7214b
commit 88918aad10
2 changed files with 2 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ The rules are consistent with [Vite Env Variables and Modes](https://vitejs.dev/
- Only variables starting with `VITE_` will be embedded into the client-side package. You can access them in the project code like this:
```ts
console.log(import.meta.env.VITE_PROT);
console.log(import.meta.env.VITE_PORT);
```
- Variables starting with `VITE_GLOB_*` will be added to the `_app-config-{version}-{hash}.js` configuration file during packaging.

View File

@@ -18,7 +18,7 @@
- 只有以 `VITE_` 开头的变量会被嵌入到客户端侧的包中,你可以在项目代码中这样访问它们:
```ts
console.log(import.meta.env.VITE_PROT);
console.log(import.meta.env.VITE_PORT);
```
- 以 `VITE_GLOB_*` 开头的的变量,在打包的时候,会被加入 `_app-config-{version}-{hash}.js`配置文件当中.