mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00

* refactor: move to tanstack/react-query and fix cache * refactor(releases): move to tanstack/react-query * refactor(logs): move to tanstack/react-query * refactor(base): move to tanstack/react-query * refactor(base): move to tanstack/react-query * refactor(dashboard): move to tanstack/react-query * refactor(auth): move to tanstack/react-query * refactor(filters): move to tanstack/react-query * refactor(settings): move to tanstack/react-query * chore(pkg): add tanstack/react-query * refactor(filters): move to tanstack/react-query * refactor: move to tanstack/react-query * refactor: invalidate queries * chore(pkg): remove old react-query * chore: change imports to root prefixes * build: remove needs web from test * set enableReinitialize to true to fix formik caching issues * fix all property for apiKeys const * fix toast when enabling/disabling feed --------- Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
46 lines
No EOL
1.7 KiB
TypeScript
46 lines
No EOL
1.7 KiB
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: [
|
|
{ find: "@", replacement: fileURLToPath(new URL("./src/", import.meta.url)) },
|
|
{ find: "@app", replacement: fileURLToPath(new URL("./src/", import.meta.url)) },
|
|
{ find: "@components", replacement: fileURLToPath(new URL("./src/components", import.meta.url)) },
|
|
{ find: "@forms", replacement: fileURLToPath(new URL("./src/forms", import.meta.url)) },
|
|
{ find: "@hooks", replacement: fileURLToPath(new URL("./src/hooks", import.meta.url)) },
|
|
{ find: "@api", replacement: fileURLToPath(new URL("./src/api", import.meta.url)) },
|
|
{ find: "@screens", replacement: fileURLToPath(new URL("./src/screens", import.meta.url)) },
|
|
{ find: "@utils", replacement: fileURLToPath(new URL("./src/utils", import.meta.url)) },
|
|
{ find: "@types", replacement: fileURLToPath(new URL("./src/types", import.meta.url)) },
|
|
{ find: "@domain", replacement: fileURLToPath(new URL("./src/domain", 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
|
|
}
|
|
});
|
|
}; |