Skip to content

Commit

Permalink
Use file-based route config (#1978)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenwade authored Jan 15, 2025
1 parent cc54344 commit 81a4b4e
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/routes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { flatRoutes } from '@remix-run/fs-routes';
import type { RouteConfig } from '@remix-run/route-config';

export default flatRoutes() satisfies RouteConfig;
8 changes: 8 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@
"playwright/tests/global.?(setup|teardown).ts",
"playwright/ct-tests/index.tsx"
]
},
"remix": {
"entry": [
"app/root.tsx",
"app/entry.{client,server}.tsx",
"app/routes.ts",
"app/routes/**/*.{ts,tsx}"
]
}
}
44 changes: 44 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
"@playwright/experimental-ct-react": "1.49.1",
"@playwright/test": "1.49.1",
"@remix-run/dev": "2.15.2",
"@remix-run/fs-routes": "2.15.2",
"@remix-run/route-config": "2.15.2",
"@remix-run/testing": "2.15.2",
"@types/eslint__js": "8.42.3",
"@types/eslint-config-prettier": "6.11.3",
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig({
v3_fetcherPersist: true,
v3_lazyRouteDiscovery: true,
v3_relativeSplatPath: true,
v3_routeConfig: true,
v3_throwAbortReason: true,
},
}),
Expand Down

0 comments on commit 81a4b4e

Please sign in to comment.