Repository navigation
feat(solidjs-vite-plugin): follow Solid's SSR and client mode entry rules - #2148
Merged
webpro merged 26 commits intoOct 15, 2026
Merged
Conversation
Mark the files @solidjs/vite-plugin loads in start mode as production
entries: src/entry-server.*, src/entry-client.*, src/App.*,
src/Document.*, env.{ts,js} and the module paths in the start options.
Resolve start entries from the Vite root, accounting for SSR and client
mode. Also include serverFunctions.configure with or without start.
Keep start mode conventions, literal start.* paths, serverFunctions.configure and the Vite root for configs that import the plugin statically. Lazily loaded plugins, ternary paths and the SSR and client mode rules move to follow-up pull requests. The tests are now one table over smaller fixtures without node_modules stubs.
commit: |
…y-paths # Conflicts: # packages/knip/fixtures/plugins/solidjs-vite-plugin-entries/vite.config.ts # packages/knip/src/plugins/solidjs-vite-plugin/resolveFromAST.ts # packages/knip/test/plugins/solidjs-vite-plugin.test.ts
…-plugin-mode-rules # Conflicts: # packages/knip/fixtures/plugins/solidjs-vite-plugin-root/package.json # packages/knip/test/plugins/solidjs-vite-plugin.test.ts
webpro
reviewed
Oct 14, 2026
webpro
left a comment
Member
There was a problem hiding this comment.
No findings from my side: the mode rules match resolveEntries, including setup being ignored in client mode.
…gin-lazy-paths # Conflicts: # packages/knip/fixtures/plugins/solidjs-vite-plugin-spa/vite.config.ts # packages/knip/fixtures/plugins/solidjs-vite-plugin/vite.config.ts # packages/knip/src/plugins/solidjs-vite-plugin/resolveFromAST.ts # packages/knip/test/plugins/solidjs-vite-plugin.test.ts
…-plugin-mode-rules
everton-dgn
marked this pull request as ready for review
October 14, 2026 22:53
…-plugin-mode-rules # Conflicts: # packages/knip/test/plugins/solidjs-vite-plugin.test.ts
…-plugin-mode-rules
Contributor
Author
|
Updated after #2147: merged main (resolving the conflicts with #2155) and dropped everything from #2147, including the spread check. Only direct calls to the statically imported plugin are read, and the mode is only decided from a literal |
webpro
approved these changes
Oct 15, 2026
webpro
left a comment
Member
There was a problem hiding this comment.
Thanks for simplifying this. The mode rules look good. hasEntryFile does filesystem access, which we're trying to avoid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2144.
Solid picks between authored and generated entries per mode (
resolveEntriesinsrc/ssr/index.ts, linked in the plugin):ssr: trueand both entry files present, by option or by convention,AppandDocumentare not loadedssr,src/entry-server.*andstart.setupare ignored, and so isAppwhen there is a client entryThe plugin kept all of them as entries, which hides an
App.tsxorDocument.tsxthat nothing imports anymore after moving to authored entries. It now applies the same rules. Conventional entry files are detected withisFile. The mode is only decided from a literalssr: with another expression, nothing is dropped. Options spread into the call are not followed.One limit: with
--cache, adding or removing the entry files is only picked up whenvite.config.*changes, because the cached result belongs to the config file.