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

Document .env files support #9

Open
michalkvasnicak opened this issue Jun 17, 2017 · 0 comments
Open

Document .env files support #9

michalkvasnicak opened this issue Jun 17, 2017 · 0 comments
Labels

Comments

@michalkvasnicak
Copy link
Owner

Spust already supports .env and .env.local files. Each of the files is optional. They has to be in a root directory of a project.

If user wants to use them they work as following:

  1. file .env is loaded and parsed to variable (it is not assigned to process.env.* so it is not available in a configuration for example, see the last point)
  2. file .env.local is loaded and parsed to a variable, override previous values for intersected keys from .env file.
  3. all variables are available in your build as process.env.{name of variable} but they aren't available outside of the build. For example, you can't access them in spust.config.js. They are just interpolated using webpack.DefinePlugin()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant