Skip to content

Commit c8a2668

Browse files
authored
fix: expose GlobalPassOption.build (#10968)
**Description:** This PR #10449 changed `GlobalPassOption.build` to `pub(crate)`, but ReactLynx's WASM plugin depends on it (see https://github.com/lynx-family/lynx-stack/blob/main/packages/react/transform/src/lib.rs#L412). When upgrading `swc_core`, we encountered a crash due to this change. This PR aims to restore `GlobalPassOption.build` to `pub`.
1 parent 862e70d commit c8a2668

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/flat-turkeys-hammer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
swc: patch
3+
swc_core: patch
4+
---
5+
6+
fix: expose GlobalPassOption.build

crates/swc/src/config/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,7 @@ impl Default for GlobalInliningPassEnvs {
17051705
}
17061706

17071707
impl GlobalPassOption {
1708-
pub(crate) fn build(
1708+
pub fn build(
17091709
self,
17101710
cm: &SourceMap,
17111711
handler: &Handler,

0 commit comments

Comments
 (0)