-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
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:
- file
.envis loaded and parsed to variable (it is not assigned toprocess.env.*so it is not available in a configuration for example, see the last point) - file
.env.localis loaded and parsed to a variable, override previous values for intersected keys from.envfile. - 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 inspust.config.js. They are just interpolated usingwebpack.DefinePlugin()