-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed as not planned
Description
Clear and concise description of the problem
Now in serve mode, Vite only trigger resolveId -> load -> transform and return transformed code as a vistable file.
In fact, a vistable file should be a chunk too.
Without trigger neccessary Rollup Output Hooks,
some rollup plugins, which using this.emitFile and import.meta.ROLLUP_FILE_URL_${refID}, coudn't work well in Vite.
Suggested solution
Please consider to trigger the neccessary Rollup Output Hooks in serve mode
resolveFileUrl/resolveImportMeta -> renderChunk.
A simple hack here https://github.com/morlay/vite-presets/blob/main/src/plugin-context.ts#L72-L111
now just trigger the related hook in same plugin.
Need Vite to add this feature for support all plugins.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable