Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/lib/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import { type ProjectItem, type User } from './types';

export const router = createRouter({
routeTree,
// Prefetch a route's split chunk on link hover/focus so code-splitting
// doesn't add navigation latency on first visit to each route.
defaultPreload: 'intent',
context: {
auth: {
isAuthenticated: false,
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig(({ mode }) => {

return {
plugins: [
tanstackRouter(),
tanstackRouter({ autoCodeSplitting: true }),
react(),
tailwindcss(),
isAnalyze &&
Expand Down
Loading