refactor: rebase file-system routing onto filesystem-routing - #2227
Open
brenelz wants to merge 5 commits into
Open
refactor: rebase file-system routing onto filesystem-routing#2227brenelz wants to merge 5 commits into
brenelz wants to merge 5 commits into
Conversation
Deletes the fs-routing machinery (scanner, export analysis, virtual module serializer, watcher, tree-shake — ~1,250 lines with specs) in favor of the router-neutral @solidjs/file-routes package extracted in solidjs/solid-router#572, per the architecture in solidjs/solid-router#571. Start keeps only its server conventions: SolidStartServerFileRouter now extends PageFileSystemRouter, adding the GET/POST/etc. export handling and the dataOnly flag. SolidStartClientFileRouter is the shared page convention re-exported. The config composes fileRoutes({ routers }) from @solidjs/file-routes/vite, and the virtual module id becomes the neutral solid:file-routes. Blocked on @solidjs/file-routes being published; the deleted specs already live in that package's test suite. Validated with a local file: link: tsc clean, 32/32 remaining tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Follow-up to 35a0f34. SolidStartServerFileRouter existed only to add two things `@solidjs/file-routes` now takes as config, so config/fs-router.ts goes away entirely: - `httpMethods: true` replaces the GET/POST export handling - `components: start.ssr` replaces the `dataOnly` flag The client build inputs go with it. Start was reconstructing the plugin's own `src?pick=a&pick=b` ids to seed rollup's input; `buildInputs` has the plugin contribute them from the ids it owns. server/routes.ts drops `defineRoutes` for the `pageRoutes` view the delivery adapter now serves — same nesting and `(group)` stripping, done once at build time rather than three times at runtime — and drops its `@ts-expect-error` now that the virtual module ships types. Net -134 lines; start no longer implements any file-routing machinery. Parity with the previous implementation was verified against the experiments fixture: identical manifests (both SSR modes), identical page tree, identical build inputs. 32 tests pass, tsc clean, and the basic fixture builds, serves and hot-reloads route additions. Still blocked on @solidjs/file-routes being published; validated with a local link. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The package moved out of solid-router into its own repo, dropping the Solid scope it never earned. Import sites and the dependency follow it; no behavior changes. 32 tests pass, tsc clean. Still unpublished, so the dependency is still unresolvable without a local link. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
brenelz
force-pushed
the
file-routes-migration
branch
from
July 27, 2026 22:18
52f0056 to
30b96cb
Compare
brenelz
force-pushed
the
file-routes-migration
branch
from
July 27, 2026 22:19
30b96cb to
0264c28
Compare
brenelz
marked this pull request as ready for review
July 27, 2026 22:21
…le-routes-migration # Conflicts: # packages/start/src/config/index.ts # pnpm-workspace.yaml
commit: |
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.
No description provided.