mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
fd997d3712
**Description:** This PR makes the ES minifier respect more options. Changes: - `reduce_vars` now enables IIFE invoker. - `reduce_vars` now enables seq inliner. - `top_retain` is now respected by seq inliner. - `arguments` is now ignored by seq inliner. --------- Co-authored-by: austaras <austaras@outlook.com> |
||
---|---|---|
.. | ||
benches | ||
examples | ||
fuzz | ||
inputs | ||
scripts | ||
src | ||
tests | ||
.eslintrc | ||
.gitignore | ||
Cargo.toml | ||
package.json | ||
README.md | ||
yarn.lock |
Minifier
EcmaScript minifier for the SWC project. This is basically a port of terser.
Note
Currently name mangler is very simple. To focus on creating a MVP, I (kdy1) will use simple logic for name mangler and implement the content-aware name mangler after publishing first non-beta version.
Debugging tips
If the output contains variables named e
, t
, n
it typically means the original library is published in a minified form and the input contains eval
.
The current swc name mangler does not do anything if eval
is used.
Profiling the minifier
From mac os x, run
./scripts/instrument/all.sh path/to/input/dir