Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR applies - swc-project/swc#5487 - Closes #39538 - swc-project/swc#5485 - Closes #39412 - swc-project/swc#5498 - Closes #39360
- Loading branch information
Showing
11 changed files
with
189 additions
and
189 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 30 additions & 30 deletions
60
packages/next-swc/crates/core/tests/full/example/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
function a(a, b) { | ||
(null == b || b > a.length) && (b = a.length); | ||
for(var c = 0, d = new Array(b); c < b; c++)d[c] = a[c]; | ||
return d; | ||
function n(n, t) { | ||
(null == t || t > n.length) && (t = n.length); | ||
for(var r = 0, e = new Array(t); r < t; r++)e[r] = n[r]; | ||
return e; | ||
} | ||
import b from "other"; | ||
(function(b, c) { | ||
return function(a) { | ||
if (Array.isArray(a)) return a; | ||
}(b) || function(a, b) { | ||
var c, d, e = null == a ? null : "undefined" != typeof Symbol && a[Symbol.iterator] || a["@@iterator"]; | ||
if (null != e) { | ||
var f = [], g = !0, h = !1; | ||
import t from "other"; | ||
(function(t, r) { | ||
return function(n) { | ||
if (Array.isArray(n)) return n; | ||
}(t) || function(n, t) { | ||
var r, e, o = null == n ? null : "undefined" != typeof Symbol && n[Symbol.iterator] || n["@@iterator"]; | ||
if (null != o) { | ||
var u = [], l = !0, f = !1; | ||
try { | ||
for(e = e.call(a); !(g = (c = e.next()).done) && (f.push(c.value), !b || f.length !== b); g = !0); | ||
for(o = o.call(n); !(l = (r = o.next()).done) && (u.push(r.value), !t || u.length !== t); l = !0); | ||
} catch (i) { | ||
h = !0, d = i; | ||
f = !0, e = i; | ||
} finally{ | ||
try { | ||
g || null == e.return || e.return(); | ||
l || null == o.return || o.return(); | ||
} finally{ | ||
if (h) throw d; | ||
if (f) throw e; | ||
} | ||
} | ||
return f; | ||
return u; | ||
} | ||
}(b, c) || function b(c, d) { | ||
if (c) { | ||
if ("string" == typeof c) return a(c, d); | ||
var e = Object.prototype.toString.call(c).slice(8, -1); | ||
if ("Object" === e && c.constructor && (e = c.constructor.name), "Map" === e || "Set" === e) return Array.from(e); | ||
if ("Arguments" === e || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)) return a(c, d); | ||
}(t, r) || function t(r, e) { | ||
if (r) { | ||
if ("string" == typeof r) return n(r, e); | ||
var o = Object.prototype.toString.call(r).slice(8, -1); | ||
if ("Object" === o && r.constructor && (o = r.constructor.name), "Map" === o || "Set" === o) return Array.from(o); | ||
if ("Arguments" === o || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return n(r, e); | ||
} | ||
}(b, c) || function() { | ||
}(t, r) || function() { | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
}(); | ||
})(b, 1)[0]; | ||
var c = function() { | ||
})(t, 1)[0]; | ||
var r = function() { | ||
"use strict"; | ||
!function(a, b) { | ||
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function"); | ||
}(this, c); | ||
!function(n, t) { | ||
if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); | ||
}(this, r); | ||
}; | ||
export var __N_SSG = !0; | ||
export default function d() { | ||
export default function e() { | ||
return React.createElement("div", null); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters