hughsk / envify

:wrench: Selectively replace Node-style environment variables with plain strings.
902 stars 57 forks source link

Question: can the build error if variables are not found? #63

Open JakeSidSmith opened 3 years ago

JakeSidSmith commented 3 years ago

I'm not sure if there is already an option for this, but if not, it would be nice if we could choose to have the build error when trying to replace process.env.WHATEVER if the variable is not defined (falsey?).

Similar to https://webpack.js.org/plugins/environment-plugin/

If an environment variable is not found during bundling and no default value was provided, webpack will throw an error instead of a warning.