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): Don't inline into arrow heads #7099

Merged
merged 63 commits into from Mar 22, 2023
Merged

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Mar 20, 2023

Description:

t#126 is appended to the function body, but it's wrong.

image

Related issue:

@kdy1 kdy1 added this to the Planned milestone Mar 20, 2023
@kdy1 kdy1 self-assigned this Mar 20, 2023
@kdy1 kdy1 changed the title fix(es/minifier): Fix a bug fix(es/minifier): Fix a bug of name mangler Mar 20, 2023
@kdy1 kdy1 changed the title fix(es/minifier): Fix a bug of name mangler fix(es/minifier): Inject vars created from params to correct place Mar 20, 2023
@kdy1 kdy1 changed the title fix(es/minifier): Inject vars created from params to correct place fix(es/minifier): Don't inline into arrow heads Mar 20, 2023
Copy link
Member Author

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swc-bump:

  • swc_ecma_usage_analyzer

@@ -0,0 +1,539 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried my best to reduce this, but these seem quite close to the minimal required code.

place: o = "top",
offset: l = 10,
strategy: r = "absolute",
middlewares: i = [oe(Number(l)), ee(), ne({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem was that, oe was inlined into this arrow head and the variables created from the injector is appended to the arrow body.

@kdy1 kdy1 marked this pull request as ready for review March 20, 2023 06:46
@kdy1 kdy1 requested a review from jridgewell March 20, 2023 06:46
@kdy1 kdy1 enabled auto-merge (squash) March 22, 2023 01:43
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review comment generated by auto-rebase script

@kdy1 kdy1 merged commit 610e1bb into swc-project:main Mar 22, 2023
130 checks passed
@kdy1 kdy1 deleted the next-47005 branch March 22, 2023 02:24
@kdy1 kdy1 modified the milestones: Planned, v1.3.42 Mar 22, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants