-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3be44ec
commit 5115991
Showing
38 changed files
with
1,423 additions
and
2,315 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@react-router/dev": minor | ||
--- | ||
|
||
Add support for Vite v6 |
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ration/helpers/vite-template/package.json → ...tion/helpers/vite-5-template/package.json
This file contains 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
Binary file not shown.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { reactRouter } from "@react-router/dev/vite"; | ||
import { defineConfig } from "vite"; | ||
import tsconfigPaths from "vite-tsconfig-paths"; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
// @ts-expect-error `dev` depends on Vite 6, Plugin type is mismatched. | ||
reactRouter(), | ||
tsconfigPaths(), | ||
], | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
|
||
/.cache | ||
/build | ||
.env | ||
.react-router |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router"; | ||
|
||
export default function App() { | ||
return ( | ||
<html lang="en"> | ||
<head> | ||
<meta charSet="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<Meta /> | ||
<Links /> | ||
</head> | ||
<body> | ||
<Outlet /> | ||
<ScrollRestoration /> | ||
<Scripts /> | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { type RouteConfig } from "@react-router/dev/routes"; | ||
import { flatRoutes } from "@react-router/fs-routes"; | ||
|
||
export default flatRoutes() satisfies RouteConfig; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { MetaFunction } from "react-router"; | ||
|
||
export const meta: MetaFunction = () => { | ||
return [ | ||
{ title: "New React Router App" }, | ||
{ name: "description", content: "Welcome to React Router!" }, | ||
]; | ||
}; | ||
|
||
export default function Index() { | ||
return ( | ||
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}> | ||
<h1>Welcome to React Router</h1> | ||
</div> | ||
); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/// <reference types="@react-router/node" /> | ||
/// <reference types="vite/client" /> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "integration-vite-6-template", | ||
"version": "0.0.0", | ||
"private": true, | ||
"sideEffects": false, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "react-router dev", | ||
"build": "react-router build", | ||
"start": "react-router-serve ./build/server/index.js", | ||
"typecheck": "react-router typegen && tsc" | ||
}, | ||
"dependencies": { | ||
"@react-router/express": "workspace:*", | ||
"@react-router/node": "workspace:*", | ||
"@react-router/serve": "workspace:*", | ||
"@vanilla-extract/css": "^1.10.0", | ||
"@vanilla-extract/vite-plugin": "^3.9.2", | ||
"express": "^4.19.2", | ||
"isbot": "^5.1.11", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-router": "workspace:*", | ||
"serialize-javascript": "^6.0.1" | ||
}, | ||
"devDependencies": { | ||
"@react-router/dev": "workspace:*", | ||
"@react-router/fs-routes": "workspace:*", | ||
"@react-router/remix-routes-option-adapter": "workspace:*", | ||
"@types/react": "^18.2.20", | ||
"@types/react-dom": "^18.2.7", | ||
"eslint": "^8.38.0", | ||
"typescript": "^5.1.6", | ||
"vite": "^6.0.0", | ||
"vite-env-only": "^3.0.1", | ||
"vite-tsconfig-paths": "^4.2.1" | ||
}, | ||
"engines": { | ||
"node": ">=20.0.0" | ||
} | ||
} |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"include": [ | ||
"env.d.ts", | ||
"**/*.ts", | ||
"**/*.tsx", | ||
".react-router/types/**/*.d.ts" | ||
], | ||
"compilerOptions": { | ||
"lib": ["DOM", "DOM.Iterable", "ES2022"], | ||
"verbatimModuleSyntax": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"target": "ES2022", | ||
"strict": true, | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"baseUrl": ".", | ||
"paths": { | ||
"~/*": ["./app/*"] | ||
}, | ||
"noEmit": true, | ||
"rootDirs": [".", ".react-router/types/"] | ||
} | ||
} |
File renamed without changes.
This file contains 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
Binary file not shown.
This file contains 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
This file contains 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
Oops, something went wrong.