react-native-dotenv icon indicating copy to clipboard operation
react-native-dotenv copied to clipboard

Import *

Open andreechristian opened this issue 6 years ago • 3 comments

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

andreechristian avatar Oct 12 '18 08:10 andreechristian

@andreechristian did you manage to resolve this?

chrise86 avatar Mar 14 '19 11:03 chrise86

No solution for this?

ammichael avatar Apr 18 '19 15:04 ammichael

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

juliandramirez avatar Oct 16 '19 21:10 juliandramirez