mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00

* fix(build): dockerignore add exclusions * fix: baseurl and build * chore: removed react-app-env instead use vite * chore: updated server and embedding static files. * commented because conflict I believe, and not needed. * docs: updated readme * chore: updated json and added vite * chore: import fix * chore: updated yarn.lock and package json * build: add empty dist to compile backend * fix: use / as default baseurl --------- Co-authored-by: KaiserBh <kaiserbh@proton.me> Co-authored-by: ze0s <ze0s@riseup.net>
37 lines
No EOL
864 B
TypeScript
37 lines
No EOL
864 B
TypeScript
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
|
|
}
|
|
});
|
|
}; |