Skip to content

fix: module library when exports are provided unknownly#20293

Merged
alexander-akait merged 4 commits intomainfrom
null-provided-module-lib
Jan 13, 2026
Merged

fix: module library when exports are provided unknownly#20293
alexander-akait merged 4 commits intomainfrom
null-provided-module-lib

Conversation

@hai-x
Copy link
Member

@hai-x hai-x commented Jan 9, 2026

Summary

What kind of change does this PR introduce?

Fixes #15270.

image

The above describes the topologically ordered flag export processing. As shown, the entry module may have unknown exports (exports: true). When a module falls into this case, its exportsInfo is provided as null.

So for entry module, the current approach is to manually resolve these dependencies and render those exports in the startup.

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

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

🦋 Changeset detected

Latest commit: 43af7f6

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 9, 2026

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

Install it locally:

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

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 9, 2026

Merging this PR will not alter performance

✅ 72 untouched benchmarks


Comparing null-provided-module-lib (43af7f6) with main (5ac7bf6)

Open in CodSpeed

@alexander-akait
Copy link
Member

@hai-x Looks good, let's add test cases

@alexander-akait
Copy link
Member

@hai-x let's skip tests for Node@10

@alexander-akait alexander-akait merged commit 7dd5e42 into main Jan 13, 2026
88 of 91 checks passed
@alexander-akait alexander-akait deleted the null-provided-module-lib branch January 13, 2026 15:08
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.

Preserve star exports for externalized dependencies in module output

2 participants