You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This breaks with dotenv-webpack, seems like it handles only direct references well (like process.env.MY_VAR, but not dynamic ones, because does a text replace.
Is there a way around it?
The text was updated successfully, but these errors were encountered:
This is correct as we use webpack.DefinePlugin under the hood. Because of this is essentially does an advanced "search and replace" for any references to process.env.VAR.
We have explored resolving other issues related to this as well (see #70 (comment)).
For right now to maintain extensibility with future webpack upgrades I do not see any way around this. Should webpack eventually change how DefinePlugin works we would of course have those ready to use immediately without any updates.
If you have any ideas though I would be more than happy to hear them and consider exploring them.
I will leave this open temporarily until we have an appropriate answer.
Sample code:
This breaks with
dotenv-webpack
, seems like it handles only direct references well (likeprocess.env.MY_VAR
, but not dynamic ones, because does a text replace.Is there a way around it?
The text was updated successfully, but these errors were encountered: