diff --git a/web/public/index.html b/web/index.html similarity index 91% rename from web/public/index.html rename to web/index.html index b8e324d2..d4664e14 100644 --- a/web/public/index.html +++ b/web/index.html @@ -14,5 +14,6 @@
+ diff --git a/web/package.json b/web/package.json index 36b74ab4..f130c4e9 100644 --- a/web/package.json +++ b/web/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@babel/plugin-proposal-private-property-in-object": "^7.21.11", + "@vitejs/plugin-react": "^4.0.3", "axios": "^1.4.0", "history": "^5.3.0", "marked": "^5.1.1", @@ -11,17 +11,16 @@ "react-dom": "^18.2.0", "react-dropzone": "^14.2.3", "react-router-dom": "^6.14.2", - "react-scripts": "5.0.1", "react-toastify": "^9.1.3", "react-turnstile": "^1.1.1", "semantic-ui-css": "^2.5.0", - "semantic-ui-react": "^2.1.4" + "semantic-ui-react": "^2.1.4", + "vite": "^4.4.7", + "vite-plugin-env-compatible": "^1.1.1" }, "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject" + "start": "vite preview", + "build": "vite build" }, "eslintConfig": { "extends": [ diff --git a/web/vite.config.js b/web/vite.config.js new file mode 100644 index 00000000..499dc988 --- /dev/null +++ b/web/vite.config.js @@ -0,0 +1,23 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import envCompatible from 'vite-plugin-env-compatible' + +export default defineConfig({ + plugins: [ + react(), + envCompatible({ + prefix: "REACT_APP_", + mountedPath: "process.env", + }), + ], + build: { + outDir: "build" + }, + esbuild: { + loader: "tsx", + include: [ + "src/**/*.js", + ], + exclude: [], + } +})