Skip to content

Commit

Permalink
chore: bump swc (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerFeng authored Aug 21, 2023
1 parent 8f741e9 commit 77ebf43
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 51 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-apes-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@modern-js/swc-plugins": patch
---

chore: bump swc
100 changes: 50 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ anyhow = { version = "1.0.69" }
dashmap = { version = "5.4.0" }
serde = "1.0.163"
serde_json = "1.0.91"
swc_core = { version = "0.79.49", default-features = false }
swc_core = { version = "0.79.56", default-features = false }
8 changes: 8 additions & 0 deletions binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class Compiler extends RawCompiler {

delete config.extensions;

// SWC will crash if use jsc.target and env.targets together after bump
if (config.jsc?.target && config.env?.targets) {
console.warn(
"[SWC] Do not use jsc.target and env.targets together, when used together only env.targets works"
);
delete config.jsc.target;
}

try {
super({
swc: JSON.stringify(config),
Expand Down

0 comments on commit 77ebf43

Please sign in to comment.