From 452e2631ca1b490eebb85223dbec180a3ab431ab Mon Sep 17 00:00:00 2001 From: Quentin Guillemin Date: Wed, 18 Oct 2023 12:41:32 +0200 Subject: [PATCH] refactor: dynamic proxy base url --- vite.config.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 221e0327..67c3fb8b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -30,11 +30,11 @@ export default ({ mode }: { mode: string }) => { }, server: { proxy: { - '^(?:/.*)?/api': { + '^(?:/[^/]*)?/api': { target: process.env.VITE_PROXY_API_URL, changeOrigin: true, }, - '^(?:/.*)?/app': { + '^(?:/[^/]*)?/app': { target: process.env.VITE_PROXY_API_URL, changeOrigin: true, }, @@ -43,9 +43,9 @@ export default ({ mode }: { mode: string }) => { build: { rollupOptions: { output: { - assetFileNames: 'assets/glc-[name].[ext]', - entryFileNames: 'assets/glc-[name].js', - chunkFileNames: 'assets/glc-[name].js', + assetFileNames: 'assets/[name].[ext]', + entryFileNames: 'assets/[name].js', + chunkFileNames: 'assets/[name].js', }, }, },