feat: use vite for faster build

This commit is contained in:
ckt1031
2023-07-31 22:17:07 +08:00
parent 30a7f1a1c7
commit 0a4b4316c8
3 changed files with 30 additions and 6 deletions

23
web/vite.config.js Normal file
View File

@@ -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: [],
}
})