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

Virtual modules are not supported #101

Closed
jamesopstad opened this issue Dec 10, 2024 · 1 comment · Fixed by #104
Closed

Virtual modules are not supported #101

jamesopstad opened this issue Dec 10, 2024 · 1 comment · Fixed by #104
Assignees

Comments

@jamesopstad
Copy link
Contributor

jamesopstad commented Dec 10, 2024

Virtual modules are currently not supported. As part of the fix, we should add a virtual-modules playground so we have test coverage.

@jamesopstad jamesopstad added this to the Initial beta release milestone Dec 10, 2024
@jamesopstad jamesopstad self-assigned this Dec 10, 2024
@jamesopstad
Copy link
Contributor Author

jamesopstad commented Dec 10, 2024

Investigation has shown that the reason they don't work is this:

// Sometimes Vite fails to resolve built-ins and converts them to "url-friendly" ids
// that start with `/@id/...`.
if (moduleId.startsWith('/@id/')) {
const result = {
externalize: moduleId.slice('/@id/'.length),
type: 'builtin',
} satisfies vite.FetchResult;
return new MiniflareResponse(JSON.stringify({ result }));
}

#63 needs resolving but, for now, we will remove this and disable the nodejs_compat tests until we find a better approach.

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 a pull request may close this issue.

1 participant