tusbar / babel-plugin-dotenv-import

Load environment variables using import statements.
MIT License
80 stars 8 forks source link

Unable to use default/wildcard import #371

Open leoadamo opened 1 year ago

leoadamo commented 1 year ago

Hello @tusbar, hope you are fine!

I am using this plugin in a gulp-based project, and it would be useful to import all .env variables together, for example:

import myEnvConfig from “@env”;

Also, I’ve tried to use a wildcard import, like this:

import * as myEnvConfig from “@env”;

But it seems like wildcards are not supported too.

Current behavior:

When trying to use those approaches I receive an error in the console saying that default/wildcard exports are not supported by the module.

Thank you in advance guys!