kerimdzhanov / dotenv-flow

Loads environment variables from .env.[development|test|production][.local] files for Node.js® projects.
MIT License
859 stars 36 forks source link

Add exports field #57

Closed perrin4869 closed 1 year ago

perrin4869 commented 2 years ago

This fixes import dotenv-flow/config from inside an mjs module

perrin4869 commented 2 years ago

Closes https://github.com/kerimdzhanov/dotenv-flow/issues/56

kerimdzhanov commented 1 year ago

Hi @perrin4869,

Thanks a lot for the PR! That makes total sense.

The only question I am thinking about is how can we make sure that it won't break existing Node.js's require() behavior in different versions/transpilers/environments? And maybe for the future as well, when we will be making some related changes to package.json, how can we make sure that we won't break this new TS/ES6's import behavior?

I am thinking of some kind of CI test for it 🀔, any ideas?

perrin4869 commented 1 year ago

I added some tests here! Not very thorough though 😅

kerimdzhanov commented 1 year ago

Hi @perrin4869, could you please rebase? Feel free to rewrite with your own version of yarn.lock, I am going to update all the dependencies in a separate commit.

kerimdzhanov commented 1 year ago

All good, no worries. I've figured out how can I rebase myself 😅

✅ Merged as commit 352888b.

Thanks a lot for the PR!