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

fix(es/minifier): Improve minifier #3350

Merged
merged 116 commits into from Jan 27, 2022
Merged

fix(es/minifier): Improve minifier #3350

merged 116 commits into from Jan 27, 2022

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Jan 24, 2022

Description:

swc_ecma_transforms_optimization:

  • expr_simplifier: Track more changes.

swc_ecma_minifier:

  • Analyze after applying the pure optimizer.
  • Preserve access to a variable not in scope.
  • compress: Remove string literal if it was not a directive.
  • pure/collapse_vars: Merge vars declared in the first statement into one with initializers if collapse_vars and join_vars are enabled.
  • unused: Use usage_count instead of ref_count.
  • unused: Fix dropping rule for member expressions.
  • unused: Fix dropping rule for declarations.
  • hoist_props: Preserve exported items.

@kdy1 kdy1 added this to the v1.2.134 milestone Jan 24, 2022
@kdy1 kdy1 changed the title fix(es/minifier): Analyze after applying pure optimizer fix(es/minifier): Improve minifier Jan 24, 2022
@kdy1 kdy1 changed the title fix(es/minifier): Improve minifier fix(es/minifier): Analyze after applying the pure optimizer Jan 24, 2022
@kdy1 kdy1 modified the milestones: v1.2.134, v1.2.135 Jan 25, 2022
@kdy1 kdy1 merged commit 68e9017 into swc-project:main Jan 27, 2022
@kdy1 kdy1 deleted the minifier-data branch January 27, 2022 06:36
kodiakhq bot pushed a commit to vercel/next.js that referenced this pull request Feb 3, 2022
This PR applies

 - swc-project/swc#3350

which fixes lots of minifier issues.

 - swc-project/swc#3391

This fixes the regression of evaluatior.

 - swc-project/swc#3436

This fixes codegen bugs.

 - swc-project/swc#3425

This improves compression.

 - swc-project/swc#3400

This fixes some transform bugs.

 - swc-project/swc#3392
 
This implements more terser options.
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
This PR applies

 - swc-project/swc#3350

which fixes lots of minifier issues.

 - swc-project/swc#3391

This fixes the regression of evaluatior.

 - swc-project/swc#3436

This fixes codegen bugs.

 - swc-project/swc#3425

This improves compression.

 - swc-project/swc#3400

This fixes some transform bugs.

 - swc-project/swc#3392
 
This implements more terser options.
@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

1 participant