Added base path to env variables

This commit is contained in:
Florian Sylvain
2023-01-18 00:45:41 +01:00
parent 5b91962952
commit 4fdf75e158
2 changed files with 8 additions and 6 deletions
+1
View File
@@ -12,6 +12,7 @@ docker-compose up
TODO TODO
## Environment variables ## Environment variables
- ./env - ./env
- APP_BASE_FRONT_PATH
- APP_API_ADDRESS - APP_API_ADDRESS
- APP_FRONT_ADDRESS - APP_FRONT_ADDRESS
- APP_API_PORT - APP_API_PORT
+6 -5
View File
@@ -1,6 +1,6 @@
import { fileURLToPath, URL } from 'node:url' import { fileURLToPath, URL } from "node:url"
import { defineConfig, loadEnv } from 'vite' import { defineConfig, loadEnv } from "vite"
import vue from '@vitejs/plugin-vue' import vue from "@vitejs/plugin-vue"
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => { export default defineConfig(({ command, mode }) => {
@@ -11,7 +11,7 @@ export default defineConfig(({ command, mode }) => {
plugins: [vue()], plugins: [vue()],
resolve: { resolve: {
alias: { alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)) "@": fileURLToPath(new URL("./src", import.meta.url)),
} }
}, },
define: { define: {
@@ -22,6 +22,7 @@ export default defineConfig(({ command, mode }) => {
}, },
server: { server: {
port: env1.APP_FRONT_PORT, port: env1.APP_FRONT_PORT,
} },
base: env1.APP_BASE_FRONT_PATH ?? "/"
} }
}) })