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

Import * #50

Open andreechristian opened 5 years ago

andreechristian commented 5 years ago

I want to import ALL of available variables by using import * as environments from "react-native-dotenv" But it return an error

cannot read property "name" of undefined

chrise86 commented 5 years ago

@andreechristian did you manage to resolve this?

ammichael commented 5 years ago

No solution for this?

juliandramirez commented 4 years ago

This is a babel module; I would assume that in some part of its code it actually replaces variable.name (which is undefined in this case) with the corresponding value during the build process. Hence the * syntax can not be supported.

Note: I have not analyzed the source code, I'm just guessing based on my knowledge on how this package works