Skip to main content

Changelog: swc v1.2.62

· One min read

Bugfixes#

Comments (#1165)#

swc doesn't drop comments anymore.

modules: Var names (#1787)#

Previously swc had a bug which can break code if file name meets some condition.

Fixed by @cspotcode.

typescript: Object pattern (#1835)#

import { A } from "./a";import { B } from "./b";
const { A: AB } = B;
console.log(A, AB);

Previosuly swc dropped A because of bug in variable collector.

Fixed by @Austaras.

Fix helper used by module pass (#1829)#

Previously swc sometimes used wrong helper for module imports.

Fixed by @cspotcode.

fixer: call in new #1857#

new (foo())();

Previously swc incorrrectly striped (foo()) as foo().

Fixed by @motiz88.

optimizer: nullish coalescing operator (#1851)#

x ?? (x = "abc");

Preivousy the optmizer of swc incorrectly optimized it as x = "abc";. It's now fixed.

Improvements#

Supports for path aliasing (#702)#

swc now supports paths, which uses identical syntax for paths in tsconfig.json.

Better sourcemap (, , )#

Source map generated by swc is greayly improved.