feat: migrate to vite
This commit is contained in:
21
index.html
Normal file
21
index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using Vite"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="/logo192.png" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<title>Browser Recorder</title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="module" src="/src/index.tsx"></script>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!-- Vite will automatically inject the necessary scripts here during the build -->
|
||||
</body>
|
||||
</html>
|
||||
35
package.json
35
package.json
@@ -11,15 +11,13 @@
|
||||
"@mui/lab": "^5.0.0-alpha.80",
|
||||
"@mui/material": "^5.6.2",
|
||||
"@react-oauth/google": "^0.12.1",
|
||||
"@testing-library/jest-dom": "^5.16.4",
|
||||
"@testing-library/react": "^13.1.1",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
"@types/body-parser": "^1.19.5",
|
||||
"@types/csurf": "^1.11.5",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/jsonwebtoken": "^9.0.7",
|
||||
"@types/node": "^16.11.27",
|
||||
"@types/node": "22.7.9",
|
||||
"@types/react": "^18.0.5",
|
||||
"@types/react-dom": "^18.0.1",
|
||||
"@types/uuid": "^8.3.4",
|
||||
@@ -55,9 +53,7 @@
|
||||
"react-dom": "^18.0.0",
|
||||
"react-highlight": "0.15.0",
|
||||
"react-router-dom": "^6.26.1",
|
||||
"react-scripts": "5.0.1",
|
||||
"react-simple-code-editor": "^0.11.2",
|
||||
"react-split": "^2.0.14",
|
||||
"react-transition-group": "^4.4.2",
|
||||
"sequelize": "^6.37.3",
|
||||
"sequelize-typescript": "^2.1.6",
|
||||
@@ -74,44 +70,31 @@
|
||||
"scripts": {
|
||||
"start": "concurrently -k \"npm run server\" \"npm run client\"",
|
||||
"server": "./node_modules/.bin/nodemon server/src/server.ts",
|
||||
"client": "react-app-rewired start",
|
||||
"build": "react-app-rewired build",
|
||||
"test": "react-app-rewired test",
|
||||
"eject": "react-scripts eject",
|
||||
"client": "vite",
|
||||
"build": "vite build",
|
||||
"test": "vite preview",
|
||||
"lint": "./node_modules/.bin/eslint ."
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
"react-app"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/cookie-parser": "^1.4.7",
|
||||
"@types/express": "^4.17.13",
|
||||
"@types/loglevel": "^1.6.3",
|
||||
"@types/node": "^17.0.15",
|
||||
"@types/node": "22.7.9",
|
||||
"@types/node-cron": "^3.0.11",
|
||||
"@types/prismjs": "^1.26.0",
|
||||
"@types/react-highlight": "^0.12.5",
|
||||
"@types/react-transition-group": "^4.4.4",
|
||||
"@types/styled-components": "^5.1.23",
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"ajv": "^8.8.2",
|
||||
"concurrently": "^7.0.0",
|
||||
"nodemon": "^2.0.15",
|
||||
"react-app-rewired": "^2.2.1",
|
||||
"ts-node": "^10.4.0"
|
||||
"ts-node": "^10.4.0",
|
||||
"vite": "^5.4.10"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"target": "esnext",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
11
vite.config.js
Normal file
11
vite.config.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig(() => {
|
||||
return {
|
||||
build: {
|
||||
outDir: 'build',
|
||||
},
|
||||
plugins: [react()],
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user