zetachang / react-native-dotenv

A Babel preset let you import application configs from .env file (zero runtime dependency)
MIT License
915 stars 68 forks source link

using env inside metro.config.js #58

Open bosung90 opened 5 years ago

bosung90 commented 5 years ago

I have custom metro.config.js

that file does not allow import keyword.

Using this library does seem to work with require.

Any way I can use environment variable inside metro.config.js?

luisfuertes commented 5 years ago

metro.config.js not work for me:

Unable to resolve module "path" from ../node_modules/react-native-dotenv/index.js

amitrai98 commented 4 years ago

facing same issue, Any update ?

dragma commented 4 years ago

Same here.