question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

swc does not support minification yet

See original GitHub issue

The 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:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kdy1commented, Aug 3, 2021

Thanks for reporting!

1reaction
kdy1commented, Aug 3, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found