fix: incorrect identifier of import binding for module externals#20107
fix: incorrect identifier of import binding for module externals#20107alexander-akait merged 1 commit intomainfrom
Conversation
|
This PR is packaged and the instant preview is available (141fd11). Install it locally:
npm i -D https://pkg.pr.new/webpack@141fd11
yarn add -D https://pkg.pr.new/webpack@141fd11
pnpm add -D https://pkg.pr.new/webpack@141fd11 |
CodSpeed Performance ReportMerging #20107 will not alter performanceComparing Summary
|
|
Thank you @hai-x you are beyond awesome!!! Edit: The code runs properly with this PR! My mistake for upgrading webpack in the wrong yarn workspace. (Companion uses nested workspaces and I wasn't paying close enough attention to which one is used for the packaging build...) You can read or ignore the rest of this up to the final "minor footnote" about the github-actions bot.
The test-code: ( the result: In fact calling Minor footnote: FWIW, if you have control of the github-actions bot output, the correct syntax for yarn (probably yarn "2", i.e. 4.10) is: (i.e. needs 'webpack@' before the URL) |
|
Oh wait! It does work! I upgraded the wrong yarn workspace. On that note, webpack from this PR identifies itself as 5.102.1 during run time. It might be useful, if possible, to add something to differentiate it from the release version, so we're certain I'm running the correct version... I'll have to be more vigilant in the future too... |
f4b3582 to
b820390
Compare
b820390 to
141fd11
Compare
|
@hai-x I am fine with this changes, let's wait @xiaoboost review too |
|
i think it probably wanted to tag “xiaoxiaojx“, not me(xiaoboost)? |
Yeah, Sorry to bother you. 😂 |
Summary
What kind of change does this PR introduce?
Fixes part of #20088. We need to ensure consistent binding names.
We now construct the import binding name using the
module identifierandexport name, resolving the binding name conflict issue described in #19867. As a result, recordingchunkUsedNamesand the binding usage counter is no longer necessary.cc @xiaoxiaojx
Did you add tests for your changes?
Yes
Does this PR introduce a breaking change?
No
If relevant, what needs to be documented once your changes are merged or what have you already documented?
No