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: implement Object.defineProperty support in CommonJsExportRequireDependency#20004

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
CodewithEvilxd wants to merge1 commit intowebpack:main
base:main
Choose a base branch
Loading
fromCodewithEvilxd:fix/object-defineproperty-support

Conversation

@CodewithEvilxd
Copy link

Summary

This PR implements missing Object.defineProperty support in CommonJsExportRequireDependency, fixing a TODO that threw runtime errors.

Changes:

  • Replacethrow new Error("TODO") with proper Object.defineProperty implementation
  • Handle both used and unused export cases
  • Follow existing webpack patterns from CommonJsExportsDependency

What kind of change does this PR introduce?

  • Bugfix

Did you add tests for your changes?

  • Yes
  • No (changes are internal bug fixes that don't require new tests - existing test suite covers the functionality)

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 - these are internal improvements that don't affect public APIs

Copy link
Member

@alexander-akaitalexander-akait left a comment

Choose a reason for hiding this comment

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

Please add a test case

<p>(In chronological order)</p>

-[@google](https://github.com/google) for[Google Web Toolkit (GWT)](http://www.gwtproject.org/), which aims to compile Java to JavaScript. It features a similar[Code Splitting](http://www.gwtproject.org/doc/latest/DevGuideCodeSplitting.html)as webpack.
-[@google](https://github.com/google) for[Google Web Toolkit (GWT)](http://www.gwtproject.org/), which aims to compile Java to JavaScript. It features a similar[Code Splitting](http://www.gwtproject.org/doc/latest/DevGuideCodeSplitting.html)to webpack.

Choose a reason for hiding this comment

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

Avoid this change, not related to fix

}else{
ranges.push(`${quoteMeta(start)}-${quoteMeta(prev)}`);
}
return`[${ranges.join("")}]`;

Choose a reason for hiding this comment

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

Avoid this change, not related to fix

@hai-x
Copy link
Member

To be honest, I don’t think we currently support parsing reexport forObject.defineProperty, so it’s still a TODO.

@evenstensberg
Copy link
Member

@hai-x Lets keep this open until its fixed.

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

Reviewers

@alexander-akaitalexander-akaitalexander-akait requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@CodewithEvilxd@hai-x@evenstensberg@alexander-akait

[8]ページ先頭

©2009-2025 Movatter.jp