swc does not support minification yet
See original GitHub issueThe option exists, but it’s there because of future plan. The only thing swc does and which is similar to minification is skipping comments and some whitespaces.
I’m porting terser to rust at https://github.com/swc-project/swc/pull/1302 I think swc should be added to the list after it’s implemented.
And swc.transform
applies (really) lots of compatibility transforms, as swc reimplements features of babel.
I’m going to add swc.minify
with the PR I mentioned, so it should be used instead of swc.transform
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Minification - SWC
These properties are mostly not implemented yet, but it exists to support passing terser config to swc minify without modification.
Read more >TerserWebpackPlugin | webpack
This plugin uses terser to minify/minimize your JavaScript. ... eval wraps modules in eval("string") and the minimizer does not handle strings. cheap has ......
Read more >hiroki osame on Twitter: "@fabiosantosart @mikesherov That's really ...
The first task is to minify huge files with multiple Terser processes, and next is to implement Terser ... swc does not support...
Read more >NextJS npm run build with swmMinify on crashes
It doesn't look like SWC is supported in the platform you're running the app on. Next.js uses Terser for minification by default, ...
Read more >Migration - Parcel
In Parcel 1, importing any non-JavaScript file such as an image or video resulted in a URL. In Parcel 2, this still works...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for reporting!
Oh, I forgot excluding
if
from name mangler. AST compressor is tested heavily, but name mangler is not… So I need a better testing system.