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
The problem with #565 is that a copy of the complete env object will be placed everywhere process.env gets used. JSON is also a valid way to represent javascript objects so it should work fine. But in most cases this will add lots of redundant code.
If we can control the order the define plugin works (add it multiple times perhaps?), we can replace env values (ex: process.env.ABC) first and then replace the env object (process.env). If we do this, we don't have to add additional init code to the client.
The text was updated successfully, but these errors were encountered:
The problem with #565 is that a copy of the complete env object will be placed everywhere
process.env
gets used. JSON is also a valid way to represent javascript objects so it should work fine. But in most cases this will add lots of redundant code.Example:
will be converted to
Solution 1:
As a solution, we can initialize the process.env object on the client side:
Solution 2:
If we can control the order the define plugin works (add it multiple times perhaps?), we can replace env values (ex: process.env.ABC) first and then replace the env object (process.env). If we do this, we don't have to add additional init code to the client.
The text was updated successfully, but these errors were encountered: