Skip to content

Commit 1d48664

Browse files
build: configure automatic code-splitting (#127)
* Code splitting improvement (fix)perf: replaces .lazy routes with normal ones and add automatic code splitting ability from Tanstack Router plugin * refactor: applies linter and prettier * bump: tanstack-router and router-plugin versions fix: install devtools as dependencies (TanStack/router#3994) fix: change the order of plugins as per router docs suggestion * build: move tanstack devTools into dev dependencies --------- Co-authored-by: satnaing <[email protected]>
1 parent 555b43b commit 1d48664

40 files changed

+392
-501
lines changed

src/routeTree.gen.ts

Lines changed: 275 additions & 383 deletions
Large diffs are not rendered by default.

src/routes/(auth)/forgot-password.lazy.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { createFileRoute } from '@tanstack/react-router'
2+
import ForgotPassword from '@/features/auth/forgot-password'
3+
4+
export const Route = createFileRoute('/(auth)/forgot-password')({
5+
component: ForgotPassword,
6+
})

src/routes/(auth)/sign-in-2.lazy.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/routes/(auth)/sign-in-2.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { createFileRoute } from '@tanstack/react-router'
2+
import SignIn2 from '@/features/auth/sign-in/sign-in-2'
3+
4+
export const Route = createFileRoute('/(auth)/sign-in-2')({
5+
component: SignIn2,
6+
})

src/routes/(auth)/sign-up.lazy.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/routes/(auth)/sign-up.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { createFileRoute } from '@tanstack/react-router'
2+
import SignUp from '@/features/auth/sign-up'
3+
4+
export const Route = createFileRoute('/(auth)/sign-up')({
5+
component: SignUp,
6+
})

src/routes/(errors)/401.lazy.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/routes/(errors)/401.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { createFileRoute } from '@tanstack/react-router'
2+
import UnauthorisedError from '@/features/errors/unauthorized-error'
3+
4+
export const Route = createFileRoute('/(errors)/401')({
5+
component: UnauthorisedError,
6+
})

src/routes/(errors)/403.lazy.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)