Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(re-exports): should render use arrow getter for dynamic reexports…#20249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
JSerFeng wants to merge1 commit intowebpack:main
base:main
Choose a base branch
Loading
fromJSerFeng:fix/re-exports-dynamic

Conversation

@JSerFeng
Copy link
Contributor

@JSerFengJSerFeng commentedDec 17, 2025
edited
Loading

… when using const as decl

Summary

When reexports dynamic, runtime code will like this:

var__WEBPACK_REEXPORT_OBJECT__={};for(var__WEBPACK_IMPORT_KEY__inpath__WEBPACK_IMPORTED_MODULE_0__)if(__WEBPACK_IMPORT_KEY__!=="default")__WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__]=()=>{returnpath__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__];}

However this getter only access variable__WEBPACK_IMPORT_KEY__ when it really gets invoked, but the__WEBPACK_IMPORT_KEY__ is declared usingvar, which is in global scope not block scope infor stmt.

That will cause every getter access the last__WEBPACK_IMPORT_KEY__ in the end.

What kind of change does this PR introduce?

Fix

Did you add tests for your changes?

Yep.

Does this PR introduce a breaking change?

Nope.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

hai-x reacted with thumbs up emoji
@changeset-bot
Copy link

⚠️ No Changeset found

Latest commit:6af3489

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go.If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@JSerFengJSerFeng marked this pull request as ready for reviewDecember 17, 2025 12:19
@JSerFeng
Copy link
ContributorAuthor

I can't find the exact browserslist that supportsarrowFunction but not supportsconst, however we really repro it in one of the internal repo so...

alexander-akait reacted with thumbs up emoji

@alexander-akait
Copy link
Member

@JSerFeng Let's fix style, just update prettier

@codspeed-hq
Copy link

CodSpeed Performance Report

Merging#20249 willnot alter performance

ComparingJSerFeng:fix/re-exports-dynamic (6af3489) withmain (5bf8bc5)

Summary

✅ 72 untouched

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@JSerFeng@alexander-akait

[8]ページ先頭

©2009-2025 Movatter.jp