React-native-config: Comments are no longer supported in .env file

Created on 10 Nov 2020  路  4Comments  路  Source: luggit/react-native-config

As of version 1.4.1, comments (lines starting with #) are no longer supported in the parsed .env file.

On iOS, changes introduced in 0c42216 means that these lines will cause a Invalid entry in .env file. Please verify your .env file is correctly formatted. error to be raised.

I'm not building for Android, but I suspect the same will happen.

If that's the desired new behavior, I would suggest adding a section to the documentation mentioning it.

Most helpful comment

I agree with @gwmccull. For our development .env, we use commented out lines extensively to switch between different development configurations.

Also in our production and staging environments, comments are critical for documentation.

All 4 comments

New lines, between entries, are also no longer supported.

I'd really like to be able to have comments and new lines in the .env files. We have some keys that are commented out by default unless you're testing a very specific function, in which case, you uncomment them

I agree with @gwmccull. For our development .env, we use commented out lines extensively to switch between different development configurations.

Also in our production and staging environments, comments are critical for documentation.

Was this page helpful?
0 / 5 - 0 ratings