-
-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: dot-env plugin #4113
feat: dot-env plugin #4113
Conversation
|
We need something like https://github.com/mrsteele/dotenv-webpack, just rewrite it on using cache (i.e. inputFileSystem) and more refactor |
I have made some changes, add the caching to internal file system and refactored everything a bit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be a plugin, no need to modify webpack-cli code
@info-arnav Thanks for your update. I labeled the Pull Request so reviewers will review it again. @alexander-akait Please review the new changes. |
so, shall i rever it back to synchronous running and then make the changes suggested ? |
@alexander-akait I tried to make changes, but like if i am using async then the tests arent executing and even the environment hooks are failing. Shall i make the other chaneges u said and revert stuff to a synchronous manner ? |
@alexander-akait I have a asynchronous version as well, please let me know if i should upload that as well, if that is a major requirment. |
@alexander-akait can you please guide me on where to get the types for the logger. For input file system the type can not be used as we are using readFileSync |
please let me know about the hook also, as using initialize will remove the compilation object. so |
@alexander-akait at line 58 I tried adding a
inside the
does that make sense ? |
Also do you think adding a readFile in the compilation hook and SyncReadFile in the initilize hook makes sense ? As in we check if the compilation object was passed as an argument, if it was we proceed in an asynchronous way, else synchronous
|
open a fresh pr please |
This PR adds a plugin directory with a basic dot-env support plugin.
I am not sure on how to go about it further. But provides a basic program in the plugin directory.
#3747