Skip to content

Conversation

@nestarz
Copy link
Contributor

@nestarz nestarz commented Jul 29, 2025

Added a test to verify that the module graph is correctly resolved and loaded. The test asserts that the root of the graph is the expected module URL.

Closes #28

Added a test to verify that the module graph is correctly resolved and loaded. The test asserts that the root of the graph is the expected module URL.
@dsherret
Copy link
Member

dsherret commented Jul 29, 2025

Sorry, I don't want to maintain this (it seems out of scope for this library). Do you really need it? What's the use case?

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

I've updated the code to have a limited version of this. You'll need to bring your own types and beware that this may break between patch releases.

@dsherret dsherret changed the title feat: added graph retrieval and assertion feat(unstable): added graph retrieval and assertion Jul 30, 2025
@dsherret dsherret merged commit ff6a32b into denoland:main Jul 30, 2025
2 checks passed
@nestarz
Copy link
Contributor Author

nestarz commented Jul 31, 2025

I've updated the code to have a limited version of this. You'll need to bring your own types and beware that this may break between patch releases.

Thank you! This is very helpful for a framework I'm developing.

Sorry, I don't want to maintain this (it seems out of scope for this library). Do you really need it? What's the use case?

This was needed for a framework I'm building that's similar to Fresh. It uses the module graph to find "island" boundaries, which, in my case, are marked by "use client" directives (unlike Fresh which use a folder-based approach). These boundaries are then used as entrypoints for a bundler like esbuild or rolldown. For this use case, I need both the loader and the graph. It was frustrating to know the graph is already built by the loader, because rebuilding it a second-time is a very expensive operation, taking 2-5 seconds for some applications at each code change.

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.

provide access to inner graph

2 participants