feat(frontend): auth work
This commit is contained in:
@@ -4,6 +4,10 @@ import tailwindcss from "@tailwindcss/vite";
|
||||
import {TanStackRouterVite} from "@tanstack/router-plugin/vite";
|
||||
import path from "path";
|
||||
|
||||
import dotenv from "dotenv";
|
||||
import {fileURLToPath} from "url";
|
||||
dotenv.config({path: path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../.env")});
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss(), TanStackRouterVite({target: "react", autoCodeSplitting: true})],
|
||||
@@ -14,7 +18,7 @@ export default defineConfig({
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": {target: `http://localhost:4400`, changeOrigin: true},
|
||||
"/api": {target: `http://localhost:${Number(process.env.VITE_SERVER_PORT || 4400)}`, changeOrigin: true},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user