Skip to content

fix: should analyze correct variable for dynamic import#19936

Merged
alexander-akait merged 1 commit intowebpack:mainfrom
ahabhgk:fix-dynamicimport-predec
Sep 26, 2025
Merged

fix: should analyze correct variable for dynamic import#19936
alexander-akait merged 1 commit intowebpack:mainfrom
ahabhgk:fix-dynamicimport-predec

Conversation

@ahabhgk
Copy link
Contributor

@ahabhgk ahabhgk commented Sep 26, 2025

What kind of change does this PR introduce?

bugfix

Forgot the defineVariable causes analyze to the same name variable that declared in upper scope

Did you add tests for your changes?

Yes

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?
Nothing

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 26, 2025

CodSpeed Performance Report

Merging #19936 will degrade performances by 29.86%

Comparing ahabhgk:fix-dynamicimport-predec (87dcfa5) with main (44cf16f)

Summary

⚡ 6 improvements
❌ 1 regression
✅ 35 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
benchmark "devtool-eval", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 108.3 ms 70.8 ms +52.98%
benchmark "devtool-eval-source-map", scenario '{"name":"mode-development","mode":"development"}' 338 ms 262.2 ms +28.9%
benchmark "devtool-eval-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 69.5 ms 44.7 ms +55.57%
benchmark "devtool-source-map", scenario '{"name":"mode-development","mode":"development"}' 371.1 ms 282.4 ms +31.38%
benchmark "future-defaults", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 136.2 ms 108.1 ms +26%
benchmark "lodash", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 81.6 ms 40.8 ms ×2
benchmark "many-chunks-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 120.5 ms 171.8 ms -29.86%

@alexander-akait alexander-akait merged commit 84e5c12 into webpack:main Sep 26, 2025
44 checks passed
@alexander-akait
Copy link
Member

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants