Skip to content

Conversation

JellyBrick
Copy link
Collaborator

No description provided.

@JellyBrick JellyBrick added the enhancement New feature or request label Jun 18, 2025
@JellyBrick JellyBrick requested a review from Copilot July 2, 2025 07:15
Copy link
Contributor

@Copilot Copilot AI left a 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 from createFilter to a native load hook with filter and handler.
  • Add experimental.enableNativePlugin flags across all environments in electron.vite.config.mts.
  • Restrict solidPlugin to only certain file patterns using withFilter.

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 in withFilter.
          load: { id: [/\.(tsx|jsx)$/, '/@solid-refresh'] },

@JellyBrick JellyBrick merged commit 0253bfe into master Jul 2, 2025
9 checks passed
@JellyBrick JellyBrick deleted the feat/rolldown-native-plugin branch July 2, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant