Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Computed env vars could really use an example #2864

Closed
philBrown opened this issue Nov 1, 2018 · 0 comments
Closed

docs: Computed env vars could really use an example #2864

philBrown opened this issue Nov 1, 2018 · 0 comments

Comments

@philBrown
Copy link

What problem does this feature solve?

The documentation at https://cli.vuejs.org/guide/mode-and-env.html#using-env-variables-in-client-side-code offers no example for computed env vars.

As can be seen in this StackOverflow question, it is not clear where or how to add a computed env var.

What does the proposed API look like?

It would be great if there was some sample code, eg

process.env.VUE_APP_VERSION = require('./package.json').version

module.exports = {
  // other config, eg configureWebpack
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants