feat: sync api changes and fix auth-related bugs

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2026-01-20 19:37:33 +08:00
parent a60a796345
commit 27ac4d9b4a
6 changed files with 109 additions and 35 deletions

View File

@@ -1,15 +1,15 @@
import path from "node:path";
import tailwindcss from "@tailwindcss/vite";
import { tanstackRouter } from "@tanstack/router-plugin/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import svgr from "vite-plugin-svgr";
import path from 'node:path';
import tailwindcss from '@tailwindcss/vite';
import { tanstackRouter } from '@tanstack/router-plugin/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import svgr from 'vite-plugin-svgr';
// https://vite.dev/config/
export default defineConfig({
plugins: [
tanstackRouter({
target: "react",
target: 'react',
autoCodeSplitting: true,
}),
react(),
@@ -18,15 +18,15 @@ export default defineConfig({
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
'@': path.resolve(__dirname, './src'),
},
},
server: {
proxy: {
"/api": "http://10.0.0.250:8000",
'/api': 'http://10.0.0.10:8000',
},
host: "0.0.0.0",
host: '0.0.0.0',
port: 5173,
allowedHosts: ["nix.org.cn", "nixos.party"],
allowedHosts: ['nix.org.cn', 'nixos.party'],
},
});