@@ -111,8 +111,7 @@ In React Router v7 you define your routes using the `app/routes.ts` file. View t
111111
112112** 👉 Update dependencies (if using Remix v2 ` v3_routeConfig ` flag)**
113113
114- ``` diff
115- // app/routes.ts
114+ ``` diff filename=app/routes.ts
116115- import { type RouteConfig } from "@remix-run/route-config";
117116- import { flatRoutes } from "@remix-run/fs-routes";
118117- import { remixRoutesOptionAdapter } from "@remix-run/routes-option-adapter";
@@ -123,7 +122,6 @@ In React Router v7 you define your routes using the `app/routes.ts` file. View t
123122export default [
124123 // however your routes are defined
125124] satisfies RouteConfig;
126-
127125```
128126
129127** 👉 Add a ` routes.ts ` file (if _ not_ using Remix v2 ` v3_routeConfig ` flag)**
@@ -206,8 +204,7 @@ Note: At this point you should remove the v3 future flags you added in step 1.
206204touch react-router.config.ts
207205```
208206
209- ``` diff
210- // vite.config.ts
207+ ``` diff filename=vite.config.ts
211208export default defineConfig({
212209 plugins: [
213210- remix({
@@ -218,8 +215,9 @@ export default defineConfig({
218215 tsconfigPaths(),
219216 ],
220217});
218+ ```
221219
222- // react-router.config.ts
220+ ``` diff filename= react-router.config.ts
223221+ import type { Config } from "@react-router/dev/config";
224222+ export default {
225223+ ssr: true,
@@ -238,7 +236,7 @@ If you used the codemod you can skip this step as it was automatically completed
238236
239237Change ` vite.config.ts ` to import and use the new ` reactRouter ` plugin from ` @react-router/dev/vite ` :
240238
241- ``` diff
239+ ``` diff filename=vite.config.ts
242240- import { vitePlugin as remix } from "@remix-run/dev";
243241+ import { reactRouter } from "@react-router/dev/vite";
244242import { defineConfig } from "vite";
@@ -277,7 +275,7 @@ Update the `types` field in your `tsconfig.json` to include:
277275- The appropriate ` @react-router/* ` package in the ` types ` field
278276- ` rootDirs ` for simplified relative imports
279277
280- ``` diff
278+ ``` diff filename=tsconfig.json
281279{
282280 "include": [
283281 /* ... */
0 commit comments