Skip to content

Adding an option for process.env vars to be replaced even when context is "node" #8384

Answered by mischnic
Ricardonacif asked this question in General
Discussion options

You must be logged in to vote

Related code, the first line is the condition for when to replace process.env:

replace_env: !asset.env.isNode(),

EnvReplacer {
replace_env: config.replace_env,
env: &config.env,
is_browser: config.is_browser,
decls: &decls,
used_env: &mut result.used_env,
source_map: &source_map,
diagnostics: &mut diagnostics,
unresolved_mark
},

fn fold_expr(&mut self, node: Expr) -> Expr {

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Ricardonacif
Comment options

You must be logged in to vote
1 reply
@Ricardonacif
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants