Repository navigation
Add TanStack Start support - #168
Merged
Merged
Conversation
Detect @tanstack/react-start and @tanstack/solid-start. If the app uses the nitro vite plugin, run .output/server/index.mjs. Otherwise, serve dist/server/server.js and dist/client with srvx, which TanStack Start already depends on. Like Nuxt, the start command comes from the build setup, not the start script. The Solid template has "start": "node .output/server/index.mjs" but no nitro plugin, so that script fails. Fixes #161
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.
Fixes #161.
Changes
@tanstack/react-startor@tanstack/solid-startindependencies.nitrovite plugin (the setup in the TanStack Start hosting guide), the command isnode .output/server/index.mjs.npx srvx --prod -s ../client dist/server/server.js.vite buildwrites these files, andsrvxis already a dependency of TanStack Start, so it stays afternpm prune --omit=dev.startscript. The@tanstack/cliSolid template has"start": "node .output/server/index.mjs"but no nitro plugin, sonpm run startfails for that template. Use--cmdfor a custom server.TanStack."dev": "vite"is not treated as a static Vite site.Tests
tanstack-startfixture: Solid template shape (no nitro, with thestartscript above). It produces thesrvxcommand.tanstack-start-nitrofixture: React template withnitro. It producesnode .output/server/index.mjs.These apps from
@tanstack/cli1.169.3 build and start in Docker. The page and a static asset respond with HTTP 200: