.swcrc properly. Just like webpack + babel environment, the configuration is determined per-file. You can even mix
js if you want.
Previously common js modules were improperly handled. After some very hard work, I managed to fix it and common js imports are transcompiled to compact code.
Spack generates clean code, just like the code below.
Spack is designed to emit bundle as smallest as possible when minified.
You can now use spack to bundle react projects. See an integration test for react in the swc main repository.
exports even if it's an es module. In order to handle name conflict,
swc prevously rename
exports to something different.
It's now handled more sensitively to avoid breaking codes.
Note: this applies to typescript decorators
Previously, decorators on a parameter which does not have initializer were broken.
It was undefined, which is wrong, and it's now an instance of