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: change process_js_with_custom_pass api #6236

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/swc/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ pub struct Options {
#[serde(skip_deserializing, default)]
pub top_level_mark: Option<Mark>,

#[serde(skip_deserializing, default)]
pub unresolved_mark: Option<Mark>,

#[cfg(not(target_arch = "wasm32"))]
#[serde(default = "default_cwd")]
pub cwd: PathBuf,
Expand Down Expand Up @@ -338,7 +341,7 @@ impl Options {
}
});

let unresolved_mark = Mark::new();
let unresolved_mark = self.unresolved_mark.unwrap_or_else(Mark::new);
let top_level_mark = self.top_level_mark.unwrap_or_else(Mark::new);

let es_version = target.unwrap_or_default();
Expand Down