Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use correct format when resolving exports from sub-modules #140

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

timfish
Copy link
Contributor

@timfish timfish commented Jul 13, 2024

Closes #139

When we resolve sub-modules to get their exports, parentResolve can return a different format to the current module type and this should be used when loading the module source!

This change is potnetially a one-liner but I refactored the code a bit to avoid initially setting let variables as undefined only to set them later in an if/else.

Copy link

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

the differing formats is really tricky, something we need to keep an eye on for the future.

@timfish timfish merged commit 1db08ef into nodejs:main Jul 15, 2024
48 checks passed
@timfish timfish deleted the fix/sub-resolve-cjs branch July 15, 2024 16:10
@legendecas legendecas mentioned this pull request Jul 15, 2024
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.

Errors when importing vue/server-renderer
3 participants