You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bob.js:4 Uncaught (in promise) TypeError: import_meta.glob is not a function
at hydrate (bob.js:4:33)
at entry.js:8:27
If I move the hydrate code directly to entry.js then it works fine. I'm guessing that Vite doesn't know about the imported module so it doesn't do its static replacement of import.meta.x. Is there a way to register this import with Vite?
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Hello @mkilpatrick. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.
Describe the bug
I have an entry.js that's being imported in my index.html. My entry.js looks like this:
Where the hydrate function is coming from a foo/bob node_module package that does:
This results in:
If I move the hydrate code directly to entry.js then it works fine. I'm guessing that Vite doesn't know about the imported module so it doesn't do its static replacement of import.meta.x. Is there a way to register this import with Vite?
Reproduction
N/A
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: