mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
Revert "refactor(web): migrate create-react-app to vite (#787)"
This reverts commit edae1bbf4b
.
This commit is contained in:
parent
edae1bbf4b
commit
33897b04a1
17 changed files with 9457 additions and 715 deletions
|
@ -1,37 +0,0 @@
|
|||
import { fileURLToPath, URL } from "node:url";
|
||||
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
// https://vitejs.dev/config/
|
||||
export default ({ mode }: { mode: any }) => {
|
||||
// early load .env file
|
||||
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
|
||||
// import.meta.env.VITE_NAME available here with: process.env.VITE_NAME
|
||||
|
||||
return defineConfig({
|
||||
base: "",
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url))
|
||||
}
|
||||
},
|
||||
server: {
|
||||
port: 3000,
|
||||
hmr: {
|
||||
overlay: true
|
||||
},
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:7474/",
|
||||
changeOrigin: true,
|
||||
secure: false
|
||||
}
|
||||
}
|
||||
},
|
||||
build: {
|
||||
manifest: true,
|
||||
sourcemap: true
|
||||
}
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue