fixed relative paths not working

This commit is contained in:
AndzejsP 2023-07-01 14:06:57 +03:00
parent d7aad205fa
commit 1652e2490a

View File

@ -9,7 +9,7 @@ export default ({ mode }) => {
process.env = {...process.env, ...loadEnv(mode, process.cwd())}; process.env = {...process.env, ...loadEnv(mode, process.cwd())};
return defineConfig({ return defineConfig({
plugins: [ plugins: [
vue() vue()
], ],
@ -26,6 +26,13 @@ export default ({ mode }) => {
secure: process.env.VITE_GPT4ALL_API_SECURE, secure: process.env.VITE_GPT4ALL_API_SECURE,
rewrite: (path) => path.replace(/^\/api/, ""), rewrite: (path) => path.replace(/^\/api/, ""),
}, },
"/": {
target: process.env.VITE_GPT4ALL_API,
changeOrigin: process.env.VITE_GPT4ALL_API_CHANGE_ORIGIN,
secure: process.env.VITE_GPT4ALL_API_SECURE,
},
}, },
} }
})} })}