Skip to content

fix: reuse async entrypoint for same Worker URL within a module#20345

Merged
alexander-akait merged 2 commits intomainfrom
fix/worker
Jan 26, 2026
Merged

fix: reuse async entrypoint for same Worker URL within a module#20345
alexander-akait merged 2 commits intomainfrom
fix/worker

Conversation

@xiaoxiaojx
Copy link
Member

Summary
Reuse the same async entrypoint for the same Worker URL within a module to avoid circular dependency warnings when multiple Workers reference the same resource.

What kind of change does this PR introduce?
fix

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?
Nothing

@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2026

🦋 Changeset detected

Latest commit: d771607

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
webpack Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

This PR is packaged and the instant preview is available (bf00b73).

Install it locally:

  • npm
npm i -D webpack@https://pkg.pr.new/webpack@bf00b73
  • yarn
yarn add -D webpack@https://pkg.pr.new/webpack@bf00b73
  • pnpm
pnpm add -D webpack@https://pkg.pr.new/webpack@bf00b73

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 22, 2026

Merging this PR will not alter performance

✅ 72 untouched benchmarks


Comparing fix/worker (d771607) with main (f2d4017)

Open in CodSpeed

block.loc = expr.loc;
parser.state.module.addBlock(block);
cache[key] = block;
}
Copy link
Member

Choose a reason for hiding this comment

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

Just idea - what it we will add the circular property with true value for such case(s) and when ignore chunk creation in buildGraph, so we will not have circular dependency warning

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Looks good

@alexander-akait alexander-akait merged commit bf00b73 into main Jan 26, 2026
50 of 52 checks passed
@alexander-akait alexander-akait deleted the fix/worker branch January 26, 2026 13:10
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