diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 5a33944..758430a 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,7 +1,15 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react()], -}) +export default defineConfig(({ command }) => { + const config = { + plugins: [react()], + base: "/", + }; + + if (command !== "serve") { + config.base = "/az-qr-code/"; + } + + return config; +});