Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating minifier-js #11982

Closed
wants to merge 10 commits into from
Closed

Updating minifier-js #11982

wants to merge 10 commits into from

Conversation

denihs
Copy link
Contributor

@denihs denihs commented Mar 21, 2022

From this issue and this one, we find out a bug on terser (minify package) that was affecting some applications (more of that here).

For that, we're replacing terser for SWC. With SWC we aren't just fixing those issues but also decreasing the minification time.

- Updating history.md
- Correcting variables' name
@github-actions github-actions bot temporarily deployed to pull request March 21, 2022 14:29 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 21, 2022 14:52 Inactive
@denihs denihs added this to the Release 2.7 milestone Mar 21, 2022
docs/history.md Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to pull request March 21, 2022 17:57 Inactive
@fredmaiaarantes fredmaiaarantes requested review from fredmaiaarantes and zodern and removed request for fredmaiaarantes March 21, 2022 18:32
@denihs
Copy link
Contributor Author

denihs commented Mar 21, 2022

We encountered some challenges when trying to test the minify with SWC. We realized that the settings file used by the package wasn't being loaded correctly, so the code wasn't being minified all the way. On top of that, the minification time wasn't what we expected.

Our assumption that SWC was faster than terser was based on this benchmark, but what we got was (in average):

	time	size after minify
swc	7.869s	750.8 kB

terser
	4.742s	 462.8 kB

The test was made in a new app with some features. It's possible that the big difference is because of the missing settings, hard to say.

Based on all this, we decided to keep using terser for now, mainly because they released a new version fixing the issues we're having.

I've already tested their solution, and it's working. I'll open a new PR updating terser to this new version soon.

Thanks to everyone who reviewed it.

@denihs denihs closed this Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants