Skip to content

Commit

Permalink
remove base from importfn
Browse files Browse the repository at this point in the history
  • Loading branch information
r58Playz committed Jan 11, 2025
1 parent 2978b4a commit 9cf87c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions rewriter/native/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ let window = (1, window);
let x = new this.Abc();

try{}catch(e){this.a.log()};

await import("test")

4 changes: 2 additions & 2 deletions rewriter/rewriter/src/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ enum JsChange {
/// insert scramtag
SourceTag { span: Span },

/// replace span with `(${cfg.importfn}("${cfg.base}"))`
/// replace span with `${cfg.importfn}`
ImportFn { span: Span },
/// replace span with `${cfg.metafn}("${cfg.base}")`
MetaFn { span: Span },
Expand Down Expand Up @@ -335,7 +335,7 @@ impl JsChange {
],
},
Self::ImportFn { .. } => JsChangeInner::Replace {
str: changes!["(", &cfg.importfn, "(\"", &cfg.base, "\"))"],
str: changes![&cfg.importfn],
},
Self::MetaFn { .. } => JsChangeInner::Replace {
str: changes![&cfg.metafn, "(\"", &cfg.base],
Expand Down

0 comments on commit 9cf87c9

Please sign in to comment.