Skip to content

fix(commonjs-static): export unprovided variables#19303

Merged
alexander-akait merged 1 commit intowebpack:mainfrom
fi3ework:commonjs-static-dynamic
Mar 11, 2025
Merged

fix(commonjs-static): export unprovided variables#19303
alexander-akait merged 1 commit intowebpack:mainfrom
fi3ework:commonjs-static-dynamic

Conversation

@fi3ework
Copy link
Contributor

What kind of change does this PR introduce?

Previously, any unprovided export will be skipped directly, which will lost export in the following common library usage:

// reexport from an external module in the index file of a package
export * from 'external-module'

In this PR, I added a loop to assign exports in the ⁠way of commonjs to ensure nothing is lost.

Did you add tests for your changes?

Yes.

Does this PR introduce a breaking change?

I don't think so.

What needs to be documented once your changes are merged?

No.

@fi3ework fi3ework force-pushed the commonjs-static-dynamic branch from b2417e9 to 0f74789 Compare March 10, 2025 07:21
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.

@fi3ework Can you rebase? 😄

@fi3ework fi3ework force-pushed the commonjs-static-dynamic branch from 0f74789 to 277e17b Compare March 10, 2025 15:29
@alexander-akait
Copy link
Member

Ignore the other lint error, I will resolve it, thank you for your PR ⭐

@alexander-akait alexander-akait merged commit 1b7f0e1 into webpack:main Mar 11, 2025
41 of 45 checks passed
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