We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 677e4c5 commit b08c10fCopy full SHA for b08c10f
docs/zh/guide/mode-and-env.md
@@ -86,7 +86,14 @@ console.log(process.env.VUE_APP_SECRET)
86
所有解析出来的环境变量都可以在 `public/index.html` 中以 [HTML 插值](./html-and-static-assets.md#插值)中介绍的方式使用。
87
88
::: tip 提示
89
-你可以在 `vue.config.js` 文件中计算环境变量。它们仍然需要以 `VUE_APP_` 前缀开头。这可以用于版本信息 `process.env.VUE_APP_VERSION = require('./package.json').version`。
+你可以在 `vue.config.js` 文件中计算环境变量。它们仍然需要以 `VUE_APP_` 前缀开头。这可以用于版本信息:
90
+```js
91
+process.env.VUE_APP_VERSION = require('./package.json').version
92
+
93
+module.exports = {
94
+ // config
95
+}
96
+```
97
:::
98
99
## 只在本地有效的变量
0 commit comments