swc/crates/swc_ecma_minifier/tests/fixture
Donny/강동윤 7985e02fc8
fix(es/minifier): Remove hack for built-in class names (#8293)
**Description:**

Regarding https://github.com/vercel/next.js/issues/55682, I made a mistake while investigating. I assumed it's `swcMinify`-only but it seems like `node-fetch` is fundamentally incompatible with our minification options.

I thought `node-fetch` works with terser, but it did not, and it **should not**. But as I thought `terser` works, I assumed that `terser` has a hack for `AbortSignal`. And that's how I fixed `swcMinify: true`. The correct fix is `keep_classnames: true` but it will result in +~10% bundle size bloat.
At first, I used the correct way (`keep_classnames: true`), but it resulted in the bundle size bloat, so I mimicked the hack of terser with https://github.com/vercel/next.js/pull/57904.

While working on other minification issues, I found that there's no such hack in `terser` and I need to remove the hack in the SWC minifier.
The repro in https://github.com/vercel/next.js/issues/55682 does not work with `swcMinify: false`, even with next@14. The problem of minifier and node-fetch was not exploited before `serverMinification: true`.


**Related issue:**

 - https://github.com/brix/crypto-js/issues/415
2023-11-16 09:17:42 +09:00
..
check feat(es/minifier): Drop expressions using sequential inliner (#6936) 2023-04-29 22:19:00 +09:00
comparison test(es/minifier): Add tests for size (#5561) 2022-08-19 06:03:42 +00:00
issues fix(es/minifier): Make Finalizer inline literals (#8285) 2023-11-15 01:07:37 +00:00
next fix(es/minifier): Remove hack for built-in class names (#8293) 2023-11-16 09:17:42 +09:00
no-side-effect feat(es/minifier): Support __NO_SIDE_EFFECTS__ (#7532) 2023-06-21 07:25:29 +00:00
pr fix(es/minifier): Don't remove exports (#7856) 2023-08-25 13:47:42 +09:00
projects fix(es/minifier): Abort seq inliner if var is not fn_local or reassigned (#7804) 2023-08-17 05:15:59 +00:00
reduced refactor(es/minifier): Respect toplevel and module options (#7671) 2023-07-20 11:35:08 +09:00
simple feat(es/minifier): Inline a lazily initialized var if it's used once (#6237) 2022-10-26 06:02:22 +00:00
terser fix(es/minifier): Remove wrong rule (#6201) 2022-10-19 02:14:38 +00:00