mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-12-26 01:35:58 +08:00
feat: use vite for faster build
This commit is contained in:
23
web/vite.config.js
Normal file
23
web/vite.config.js
Normal 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: [],
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user