-
Notifications
You must be signed in to change notification settings - Fork 2.9k
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Flexible ENV configuration - Dotenv-webpack integration #589
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
React Slingshot should be more versatile when dealing with multiple environments and their configuration.
Dotenv should be supported via Dotenv-Webpack.
Describe the solution you'd like
Dotenv-webpack plugin should be integrated into the
webpack.config.dev.js
andwebpack.config.prod.js
Remove the following from
tools/build.js
. This should be controlled by the .env file not hard coded.A new
.env.default
file should be provided in the root directory, out of the box, with a similar approach:The
src
package should contain a newconfig
directory, out of the box, with a similar approach:Recommended: An .env entry should be added to the .gitignore file, out of the box.
To use the configuration simply import from the config file:
Describe alternatives you've considered
Additional context
When a user clones React Slingshot he/she will need to create a
.env
file. A stretch goal, thesetup.js
could generate one.A deployment should work as follows:
Overall, this is not perfect but gives a lot more flexibility when deploying to multiple ENVS.
The text was updated successfully, but these errors were encountered: