-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
resolveId hook importer inconsistent in pre
stage
#5981
Comments
I don't see a way for Vite to be able to provide the |
Currently, the
This seems arbitrary, and we could remove the default and pass |
Describe the bug
If using the
resolveId(importee, importer, opts)
hook withenforce: "pre"
, theimporter
will be different in dev mode vs in build mode.Specifically in dev mode the
importer
will always be the top level.html
file.For my specific use case this makes it impossible to determine what the top level scripts are without other work arounds.
I was thinking ideally I'd be able to do:
However using
isEntry
ongetModuleInfo
also only works in build mode.Reproduction
See https://github.com/DylanPiercey/vite-issue-resolve-id-repro
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: