Switch from react-scripts to Vite

This commit is contained in:
Aarni Koskela
2022-08-31 15:33:24 +03:00
parent 9572fbc0e2
commit d140e00816
8 changed files with 1240 additions and 10472 deletions

View File

@@ -9,7 +9,7 @@
/coverage
# production
/build
/dist
# misc
.DS_Store

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="./favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Web site created using create-react-app" />
<script src="https://cdn.plot.ly/plotly-latest.min.js" charset="utf-8"></script>
@@ -11,5 +11,6 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>

View File

@@ -4,22 +4,35 @@
"private": true,
"homepage": "https://koodiklinikka.github.io/palkkakysely/analysaattori/",
"dependencies": {
"@types/node": "^14.14.31",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-pivottable": "^0.11.0",
"react-plotly.js": "^2.5.1",
"react-scripts": "4.0.2",
"swr": "^0.4.2",
"typescript": "^4.1.5"
"swr": "^0.4.2"
},
"devDependencies": {
"@types/node": "^14.14.31",
"@types/plotly.js": "^1.54.8",
"@types/react-plotly.js": "^2.2.4",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
"@vitejs/plugin-react": "^2.0.0",
"eslint": "^8.19.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.7.1",
"typescript": "^4.1.5",
"vite": "^3.0.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"lint": "eslint .",
"prettify": "prettier --write ."
},
"eslintConfig": {
"extends": "react-app"
@@ -36,9 +49,5 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/plotly.js": "^1.54.8",
"@types/react-plotly.js": "^2.2.4"
}
}

View File

@@ -1 +0,0 @@
/// <reference types="react-scripts" />

1
analysaattori/src/vite-env.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
/// <reference types="vite/client" />

View File

@@ -0,0 +1,7 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
});

File diff suppressed because it is too large Load Diff