Skip to content
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

fix(es/minifier): Make inline_globals noop by default #10231

Merged
merged 2 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bindings/binding_core_wasm/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ export interface GlobalPassOption {
/**
* Name of environment variables to inline.
*
* Defaults to `["NODE_ENV", "SWC_ENV"]`
* Defaults to `[]`
*/
envs?: string[] | Record<string, string>;
}
Expand Down
2 changes: 1 addition & 1 deletion bindings/binding_minifier_wasm/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ export interface GlobalPassOption {
/**
* Name of environment variables to inline.
*
* Defaults to `["NODE_ENV", "SWC_ENV"]`
* Defaults to `[]`
*/
envs?: string[] | Record<string, string>;
}
Expand Down
8 changes: 2 additions & 6 deletions crates/swc/src/config/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{
collections::{HashMap, HashSet},
collections::HashMap,
env,
path::{Path, PathBuf},
sync::Arc,
Expand Down Expand Up @@ -1568,11 +1568,7 @@ pub enum GlobalInliningPassEnvs {

impl Default for GlobalInliningPassEnvs {
fn default() -> Self {
let mut v = HashSet::default();
v.insert(String::from("NODE_ENV"));
v.insert(String::from("SWC_ENV"));

GlobalInliningPassEnvs::List(v)
GlobalInliningPassEnvs::List(Default::default())
}
}

Expand Down
Loading