Skip to content

Fix get source basic types guard#20600

Closed
kehach07 wants to merge 1 commit intowebpack:mainfrom
kehach07:fix-getSourceBasicTypes-guard
Closed

Fix get source basic types guard#20600
kehach07 wants to merge 1 commit intowebpack:mainfrom
kehach07:fix-getSourceBasicTypes-guard

Conversation

@kehach07
Copy link
Copy Markdown

@kehach07 kehach07 commented Mar 6, 2026

Summary

What kind of change does this PR introduce?

Did you add tests for your changes?

Does this PR introduce a breaking change?

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

Use of AI

Fix TypeError: module.getSourceBasicTypes is not a function in HarmonyImportSideEffectDependencyTemplate.

Some modules do not implement getSourceBasicTypes(). This patch adds a guard to ensure the method exists before calling it.

Testing

Verified using a minimal webpack project.

Before fix:

TypeError: module.getSourceBasicTypes is not a function

After fix:

webpack compiled successfully

Fixes #20597

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 6, 2026

⚠️ No Changeset found

Latest commit: 5c8aeaa

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

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Mar 6, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: kehach07 / name: keha chandrakar (5c8aeaa)

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.

[email protected] this version has a build error。TypeError: module.getSourceBasicTypes is not a function

1 participant