Env variables shouldn't get revealed in the bundled js file #17180
harshnambiar
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Sorry, it is non standard, you can create a plugin for this |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature request
Make webpack compiled env variables end-user safe
What is the expected behavior?
Currently, any process.env variable gets shown "as it is" in the compiled bundled.js.
What is motivation or use case for adding/changing the behavior?
This clearly defeats the purpose of having environmental variables, because anyone can see the data by analyzing the js file.
How should this be implemented in your opinion?
Instead of being added to the bundled.js file, an env file should be generated at runtime called bundled.env, also to be placed in the dist folder, and in such a way that end users aren't able to access the values to the env variables.
Are you willing to work on this yourself?
it's beyond my paygrade, sorry
Beta Was this translation helpful? Give feedback.
All reactions