-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: enable rolldown native plugin #3502
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables native plugin support (via Rolldown) for the Electron Vite setup and refactors the plugin loader to use Vite’s built-in load hook API.
- Switch
plugin-loader.mts
fromcreateFilter
to a nativeload
hook withfilter
andhandler
. - Add
experimental.enableNativePlugin
flags across all environments inelectron.vite.config.mts
. - Restrict
solidPlugin
to only certain file patterns usingwithFilter
.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
vite-plugins/plugin-loader.mts | Replaced custom filter with native load hook object API. |
electron.vite.config.mts | Added experimental.enableNativePlugin , reorganized imports, and scoped solidPlugin with withFilter . |
Comments suppressed due to low confidence (2)
electron.vite.config.mts:131
- [nitpick] Referencing the HMR bug is helpful, but adding a link to the related issue or a brief summary of the root cause will aid future maintainers in understanding why this conditional is needed.
enableNativePlugin: mode !== 'development', // Disable native plugin in development mode to avoid issues with HMR (bug in rolldown-vite)
electron.vite.config.mts:140
- The second filter entry is a string literal (
'/@solid-refresh'
), which may not match as intended. If you need a path-based filter, consider using a regex (e.g./\/\@solid-refresh/
) or confirm that the string pattern is valid inwithFilter
.
load: { id: [/\.(tsx|jsx)$/, '/@solid-refresh'] },
No description provided.