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(mixedModuleGraph): handle undefined id in getModulesByFile #18201

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Sep 26, 2024

Description

Handle undefined id in getModulesByFile. I tested it manually with Astro to verify that it fixes its e2e tests, but I've not added test (withastro/astro#11979) 😬

Copy link

stackblitz bot commented Sep 26, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

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

I still don't understand why we have modules without an id 🤔
Let's merge this though to unblock testing other things in Astro.

@patak-dev patak-dev merged commit 768a50f into main Sep 26, 2024
12 checks passed
@patak-dev patak-dev deleted the fix-get-modules-by-file branch September 26, 2024 14:20
@sapphi-red
Copy link
Member

This seems to be the reason.

// some deps, like a css file referenced via @import, don't have its own
// url because they are inlined into the main css import. But they still
// need to be represented in the module graph so that they can trigger
// hmr in the importing css file.

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.

3 participants