-
Notifications
You must be signed in to change notification settings - Fork 17
Migrate to TanStack Start Beta with Vite + Nitro #7
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
Open
diogoparente
wants to merge
13
commits into
daveyplate:main
Choose a base branch
from
diogoparente:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Update scripts to use Vite dev/build commands - Update TanStack dependencies to latest versions - Add @tanstack/react-start-client dependency BREAKING CHANGE: Migration from TanStack Start app.config.ts to Vite-based setup
- Add new Vite configuration with TanStack Start plugin - Configure tsconfigPaths and Tailwind CSS plugins - Set up path alias for @/* to ./src/* - Remove old app.config.ts BREAKING CHANGE: Configuration moved from TanStack Start app.config.ts to Vite configuration
- Update path alias from app/* to src/* - Maintain @/* alias pointing to ./src/* - Keep strict TypeScript configuration
- Add createRouter function exported from src/router.tsx - Include routeTree.gen.ts for route tree generation - Configure router with scrollRestoration and proper typing This is required for the new TanStack Start structure
- Move auth-schema.ts from root to src/ - Move database/ directory (schema.ts, db.ts) to src/database/ - Move lib/ directory (auth.ts, auth-client.ts, utils.ts) to src/lib/ - Update imports to use @/ alias for src/ directory Part of migration from app/ to src/ directory structure
- Move components/ directory to src/components/ - UI components (button.tsx, dropdown-menu.tsx, sonner.tsx) - App components (header.tsx, mode-toggle.tsx) - Move hooks/ directory to src/hooks/ - Auth hooks (auth-hooks.ts) - Update all imports to use @/ path alias Part of migration from app/ to src/ directory structure
- Migrate API routes to new Server Routes format using createServerFileRoute - Update auth API route to use ServerRoute export instead of APIRoute - Move all route files from app/routes/ to src/routes/ - Update imports to use @/ path alias BREAKING CHANGE: API routes now use ServerRoute export with createServerFileRoute
- Move providers.tsx to src/ - Move logo.svg to src/ - Move types/ directory to src/types/ - Move styles/ directory to src/styles/ - Update all imports to use @/ path alias Completes migration from app/ to src/ directory structure
- Remove all files from app/ directory (routes, api.ts, client.tsx, ssr.tsx, etc.) - Remove old component, database, hooks, lib, and styles directories from root - Remove auth-schema.ts from root - Clean up old TanStack Start structure BREAKING CHANGE: All application code moved from app/ to src/ directory
- Update drizzle.config.ts to point to src/database/schema.ts - Update components.json to use src path aliases - Update .gitignore for new TanStack Start structure Completes TanStack Start migration to Vite-based setup
@diogoparente is attempting to deploy a commit to the Better Auth Team on Vercel. A member of the Team first needs to authorize it. |
- Add .output to .gitignore to exclude generated files from version control
- Add aria-label to GitHub link for screen readers - Add sr-only span text to GitHub button - Ensures all interactive elements have discernible names Fixes accessibility violations where buttons and links lacked accessible names
- Add descriptive meta description tag to document head - Improves SEO and search engine visibility - Uses consistent description with project manifest Fixes missing meta description issue
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.
🚀 Migrate to TanStack Start Beta with Vite + Nitro
Overview
This pull request implements the complete migration from TanStack Start Alpha to the new Beta structure as outlined in the official TanStack Start Beta tracking discussion. This migration modernizes the project architecture by adopting Vite as the primary build tool and restructuring the codebase to be more "Vite-native."
🎯 Motivation
The migration addresses several key improvements introduced in TanStack Start Beta:
./app
to./src
aligns with Vite ecosystem conventions and provides a better "new user experience"@tanstack/react-start
package (renamed from@tanstack/start
)📋 Changes Implemented
1. Core Infrastructure Updates (
8f3d4a9
,af120cb
)app.config.ts
tovite.config.ts
with TanStack Start pluginvite dev
,vite build
)@tanstack/react-start
2. Directory Structure Migration (
9db90f3
,d746bb6
,dd1534e
,6ba8922
,c794897
)./app/
to./src/
directoryapp/*
tosrc/*
@/
alias pointing to./src/
3. Router Configuration (
d2de5ee
)src/router.tsx
withcreateRouter
function export4. API Routes → Server Routes Migration (
affbbc9
)createAPIFileRoute
tocreateServerFileRoute
APIRoute
toServerRoute
5. Configuration Updates (
4151ec5
)drizzle.config.ts
to point tosrc/database/schema.ts
components.json
with new path aliases.gitignore
for new TanStack Start structure🔄 Breaking Changes
As per the official migration guide:
API Routes Format:
Directory Structure: All application code moved from
app/
tosrc/
Configuration: Build system now uses Vite instead of custom TanStack Start configuration
🎉 Benefits
🔗 References
✅ Testing
pnpm dev
pnpm build
Note: This migration follows the official TanStack Start Beta guidelines and positions the project for continued compatibility with future TanStack updates.