Skip to content

Commit

Permalink
refactor: dynamic proxy base url
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin-Guillemin committed Oct 18, 2023
1 parent b75dfcd commit 452e263
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand All @@ -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',
},
},
},
Expand Down

0 comments on commit 452e263

Please sign in to comment.