diff --git a/docs/guide/mode-and-env.md b/docs/guide/mode-and-env.md index cf02c53e7..62ce7244d 100644 --- a/docs/guide/mode-and-env.md +++ b/docs/guide/mode-and-env.md @@ -74,6 +74,10 @@ In addition to `VUE_APP_*` variables, there are also two special variables that All resolved env variables will be available inside `public/index.html` as discussed in [HTML - Interpolation](./html-and-static-assets.md#interpolation). + ::: tip + You can have computed env vars in your `vue.config.js` file. They still need to be prefixed with `VUE_APP_`. This is useful for version info `process.env.VUE_APP_VERSION = require('./package.json').version` + ::: + ## Local Only Variables Sometimes you might have env variables that should not be committed into the codebase, especially if your project is hosted in a public repository. In that case you should use an `.env.local` file instead. Local env files are ignored in `.gitignore` by default.