Changelog: swc v1.2.36
#
Bugfixes#1142)#
export * as ns (swc now handle export * as ns from 'foo';
by default, if you are targeting < es2020
.
Also, spack and swc_bundler now supports it directly.
#1133)#
conditional expression in await (swc errornously removed parenthesis of conditional expression in await expressions.
#1136)#
scope of optional chaining (Previously, swc miscompiled the code below.
This was compiled as
Which results in a runtime error. This is caused by sharing variable buffer. It's fixed by using two variable buffers.
#1140)#
computed keys in object literal (The hygiene pass of swc had a bug. The bug was that it does not visit key
in { [key]: value }
.
This is fixed, and code like below works properly.
#1139)#
bundler: deglob imports correctly (Previously, the code above was bundled as
which is clearly wrong. It's now fixed.
#1138)#
bundler: aliased imports (This bug occurs if nested export is mixed with aliased import.
a.ts
:
l.ts
:
entry.ts
:
This resulted in
which is wrong. It's now fixed and swc_bundler now supports quite complex imports.