Skip to content

Commit 3e80739

Browse files
committed
Set up Vite for preview
1 parent 644c0d8 commit 3e80739

File tree

4 files changed

+797
-23
lines changed

4 files changed

+797
-23
lines changed

index.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link
6+
rel="icon"
7+
type="image/svg+xml"
8+
href="/vite.svg"
9+
/>
10+
<meta
11+
name="viewport"
12+
content="width=device-width, initial-scale=1.0"
13+
/>
14+
<title>Vite + React</title>
15+
</head>
16+
<body>
17+
<div id="root"></div>
18+
<script type="module" src="/src/main.root.jsx"></script>
19+
</body>
20+
</html>

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"dev": "next dev",
8-
"build": "next build",
7+
"dev": "next",
8+
"docs": "next",
9+
"docs:build": "next build",
10+
"preview": "vite",
11+
"preview:build": "vite build",
912
"test": "echo \"Error: no test specified\" && exit 1"
1013
},
1114
"keywords": [],
@@ -23,5 +26,9 @@
2326
"react-dom": "^18.2.0",
2427
"react-router-dom": "^6.22.3",
2528
"sort-by": "^1.2.0"
29+
},
30+
"devDependencies": {
31+
"@vitejs/plugin-react": "^4.2.1",
32+
"vite": "^5.2.2"
2633
}
2734
}

0 commit comments

Comments
 (0)