From 4fdf75e158a901fd41bbd755ba57ceb5e822fcb9 Mon Sep 17 00:00:00 2001 From: Florian Sylvain Date: Wed, 18 Jan 2023 00:45:41 +0100 Subject: [PATCH] Added base path to env variables --- README.md | 1 + web/admin-gui/vite.config.ts | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 63da8ae..b2e6600 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ docker-compose up TODO ## Environment variables - ./env + - APP_BASE_FRONT_PATH - APP_API_ADDRESS - APP_FRONT_ADDRESS - APP_API_PORT diff --git a/web/admin-gui/vite.config.ts b/web/admin-gui/vite.config.ts index 11f0df9..842f6a3 100644 --- a/web/admin-gui/vite.config.ts +++ b/web/admin-gui/vite.config.ts @@ -1,17 +1,17 @@ -import { fileURLToPath, URL } from 'node:url' -import { defineConfig, loadEnv } from 'vite' -import vue from '@vitejs/plugin-vue' +import { fileURLToPath, URL } from "node:url" +import { defineConfig, loadEnv } from "vite" +import vue from "@vitejs/plugin-vue" // https://vitejs.dev/config/ export default defineConfig(({ command, mode }) => { const env1 = loadEnv(mode, "./../../", "") const env2 = loadEnv(mode, process.cwd(), "") - return { + return { plugins: [vue()], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) + "@": fileURLToPath(new URL("./src", import.meta.url)), } }, define: { @@ -22,6 +22,7 @@ export default defineConfig(({ command, mode }) => { }, server: { port: env1.APP_FRONT_PORT, - } + }, + base: env1.APP_BASE_FRONT_PATH ?? "/" } })