diff --git a/backend/main.py b/backend/main.py index 357e88b0..6a69bd9f 100644 --- a/backend/main.py +++ b/backend/main.py @@ -45,11 +45,12 @@ if not os.path.exists(frontend_dist): logging.warning("Please make sure you have built the front-end project") else: - app.mount("/static", StaticFiles(directory=frontend_dist), name="static") @app.get("/", include_in_schema=False) async def read_index(): return FileResponse(path=os.path.join(frontend_dist, "index.html")) + + app.mount("/", StaticFiles(directory=frontend_dist), name="static") if __name__ == "__main__": import uvicorn diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 7e861bd3..eb7bfc93 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -10,6 +10,7 @@ export default defineConfig(({ mode }) => { console.log(mode) console.log(env) return { + base: './', plugins: [ vue(), AutoImport({