mirror of
https://github.com/swc-project/swc.git
synced 2024-12-03 00:54:25 +03:00
0bd2a3a07e
swc_ecma_transforms_base: - `fixer`: Wrap operand of a unary expression if it's a binary expression. (#1781, #1789) swc_ecma_transforms_module: - Allow multiple `export *` even if it has the same item. (#1780) |
||
---|---|---|
.. | ||
scripts | ||
src | ||
tests | ||
Cargo.toml | ||
README.md |
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.
Testing
Tests ported from terser has
- input.js
- config.json
- mangle.json (if name mangling is enabled)
- output.js (if exists and can be modified if our one is better or due to lack of frequency-aware base54)
- output.terser.js (if exists)
Copying tests
Replace the content of terser/test/compress.js
with it of scripts/compress.js
and run npm run test:compress