mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
Added API PORT to devServer
This commit is contained in:
@@ -4,6 +4,9 @@ import vue from '@vitejs/plugin-vue'
|
|||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig(({ command, mode }) => {
|
export default defineConfig(({ command, mode }) => {
|
||||||
|
const env1 = loadEnv(mode, "./../../", "")
|
||||||
|
const env2 = loadEnv(mode, process.cwd(), "")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
resolve: {
|
resolve: {
|
||||||
@@ -13,9 +16,12 @@ export default defineConfig(({command, mode}) => {
|
|||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
__APP_ENV__: {
|
__APP_ENV__: {
|
||||||
...loadEnv(mode, "./../../", ""), // when running directly | access .env from ./web/admin-gui/
|
...env1,
|
||||||
...loadEnv(mode, process.cwd(), ""), // when running from docker
|
...env2,
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
port: env1.APP_FRONT_PORT,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user