mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
Added base path to env variables
This commit is contained in:
@@ -12,6 +12,7 @@ docker-compose up
|
||||
TODO
|
||||
## Environment variables
|
||||
- ./env
|
||||
- APP_BASE_FRONT_PATH
|
||||
- APP_API_ADDRESS
|
||||
- APP_FRONT_ADDRESS
|
||||
- APP_API_PORT
|
||||
|
||||
@@ -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 ?? "/"
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user