kHRISl33t / runtime-env-cra

Runtime environment handler for create-react-apps
MIT License
49 stars 23 forks source link

"Strict" flag to override error in production environment #11

Open dkalamar opened 2 years ago

dkalamar commented 2 years ago

Fixes #10

I have a similar use-case to the issue mentioned in #10 and in an effort to reduce additional dependences, such as env-cmd, opted to alter this code to provide a "non-strict" option to production builds. I've added a boolean flag "--strict" or "-s" to allow production builds to use the default values provided in the .env file.

I believe this adds two key uses:

I also added in a test for a line in production builds that was previously uncovered.

seanblonien commented 2 years ago

@dkalamar could you also add brief documentation describing the flag to the README's "CLI options" section?