dotenv-webpack
dotenv-webpack copied to clipboard
Look for .env.defaults and .env.example in same directory as .env
I have a mono-repo project where I'm trying to gather my .env configuration in my root directory. Currently this plugin allows users to specify the env path, but not the paths for the very useful .env.defaults and .env.examples files. This means I need to place these helper files in each of the project root paths.
An example in the code base where it's looking for the default file in a hardcoded path: https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L117
I didn't expect the plugin to look for these helpful files in a different path from the one I specified in the path option. I think adding this will make the plugin more user-friendly.
Sounds like a doable idea, I'm a little swamped ATM but if there was a PR submitted I would highly consider it.
I made this PR solving this https://github.com/mrsteele/dotenv-webpack/pull/487