Changelog: swc v1.2.42
#
Bugfixesexport *
correctly. (#1264)#
bundler: Handle of Previously the bundler of [swc][] did not exclude default
while handling export *
.
This is wrong and it's fixed.
As a result, you can now export default while using export * from './foo'
The code above now works.
#1264)#
bundler: Fix statement ordering. (Order of statements are now preserved. Previously, the bundler only considers about dependancy, but it resulted in some bugs so I patched it to preserve original order.
#1264)#
bundler: Group statements from same module. (While flattening all statements, the bundler now prefers statements from same module. It will help debugging the bundle, as related statements live at simillar place.
#1264)#
fixer: Handle assignmnet in new exprssion correctly. (Previously [swc][] errornously removed parenthesis from const a = new (a = b);
.
It resulted in const a = new a = b;
, which has different meaning.
#1264)#
fixer: Handle comma expression in new exprssion correctly. (Previously [swc][] errornously removed parenthesis from const a = new (a, b);
.
It resulted in const a = new a, b;
, which has different meaning.
This is now fixed.
#1296)#
bundler: Prevent duplicate variable. (This bug occurrs when export * as foo
is mixed with export * from ''
more than three times, and with import
.
It's now fixed and bundler bundles it correctly.
#1296)#
bundler: Handle keywords. (EcmaScript allows using keywords as an identifier in some places.
As the bundler flatten statements, it made a variable named instanceof
when it met export { foo as instanceof }
.
But this is a bug and it's now renamed to something other.
#1296)#
dce: Prevent tags in tagged template literals. (The dce was too aggresive and it removed tagged template literals. It now preserves as tagged template literals can have side effect.
Note:
If you are using some old target, you are not affected.
#1296)#
dce: Handle throw statement correctly. (Again, it errornously removed something used by throw statement. I patched it to mark argument as used correctly.