Skip to content

Commit d2f9f61

Browse files
committed
Switch to Vite
1 parent 1662858 commit d2f9f61

16 files changed

+4922
-598
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
24+
25+
__screenshots__

config-overrides.js

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

index.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<!--
13+
manifest.json provides metadata used when your web app is installed on a
14+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
15+
-->
16+
<link rel="manifest" href="manifest.json" />
17+
<title>WPILib Blocks</title>
18+
<script type="module" src="src/index.tsx"></script></head>
19+
<body>
20+
<noscript>You need to enable JavaScript to run this app.</noscript>
21+
<div id="root"></div>
22+
</body>
23+
</html>

package-lock.json

Lines changed: 4787 additions & 523 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@
1717
"re-resizable": "^6.10.1",
1818
"react": "^18.3.1",
1919
"react-dom": "^18.3.1",
20-
"react-scripts": "5.0.1",
2120
"react-syntax-highlighter": "^15.6.1",
2221
"web-vitals": "^2.1.4"
2322
},
2423
"scripts": {
25-
"start": "node --stack-size=50000 node_modules/react-scripts/scripts/start.js",
26-
"build": "react-scripts build",
27-
"test": "react-scripts test",
28-
"eject": "react-scripts eject",
29-
"gen": "node src/Blockly/gen.js"
24+
"start": "vite",
25+
"build": "vite build",
26+
"test": "vitest",
27+
"gen": "node src/Blockly/gen.js",
28+
"dev": "vite"
3029
},
3130
"eslintConfig": {
3231
"extends": [
@@ -48,13 +47,18 @@
4847
},
4948
"devDependencies": {
5049
"@shadcn/ui": "^0.0.4",
50+
"@types/node": "^22.10.0",
5151
"@types/react-syntax-highlighter": "^15.5.13",
52+
"@vitejs/plugin-react": "^4.3.4",
5253
"autoprefixer": "^10.4.20",
53-
"customize-cra": "^1.0.0",
54+
"playwright": "^1.50.1",
5455
"postcss": "^8.4.49",
55-
"raw-loader": "^4.0.2",
5656
"react-app-rewired": "^2.2.1",
5757
"tailwindcss": "^3.4.15",
58-
"typescript-strict-plugin": "^2.4.4"
58+
"typescript-strict-plugin": "^2.4.4",
59+
"vite": "^6.0.0",
60+
"vite-tsconfig-paths": "^4.3.2",
61+
"vitest": "^3.0.5",
62+
"vitest-browser-react": "^0.1.0"
5963
}
6064
}

public/index.html

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

src/App.test.js

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

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ const App: React.FC = () => {
258258
const [popconfirmLoading, setPopconfirmLoading] = useState(false);
259259

260260
const ignoreEffect = () => {
261-
if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {
261+
if (!import.meta.env.MODE || import.meta.env.MODE === 'development') {
262262
// Development mode.
263263
return (renderCounter.current < 2);
264264
}

src/setupTests.js

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

src/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

0 commit comments

Comments
 (0)