Skip to main content

Changelog: swc v1.2.75

· 2 min read

To see full list of patches, please visit https://github.com/swc-project/swc/milestone/176?closed=1

Improvements#

Error reporting: import in scripts#

Error report for import statements like

import "foo";

in script mode was improved.

Implemented by @sosukesuzuki and by #2025.

Bugfixes#

Escapes in jsx (#2013)#

This bug affects code like

<Bla title="Ú" />

Fixed by #2014.

Super access (#1959)#

Preivously some accesses to super was not transpiled correctly.

Fixed by @IronLu233 and by #1960.

Performance of the minifier (#1987)#

The minifier now works in parallel.

Fixed by #2009.

transform: fileName support (#2023)#

Preivously swc generated bad sourcemap if plugin is specified.

Fixed by @kwonoj and by #2031.

minifier: Infinite loop (#2028)#

Previous version of minifier throwed an error for

function isSymbol(s) {  return s != null;}
function isKey(value, object) {  if (value == null || isSymbol(value)) {    return true;  }  return false;}
module.exports = isKey;

Fixed by #2032.

minifier: Name mangler (#2022)#

This resulted in a bug when transforms create variables.

Fixed by #2032.

minifier: Respect settings (#2022)#

Previsouly minifier was enabled even you pass minify: false.

Fixed by #2032.

codegen: return async () (#2020)#

Previously minified codegen didn't emit a space between return and async.

Fixed by #2032.