feat: configure Vite for backoffice and portal applications with shared environment directories and API proxies

This commit is contained in:
Estifo77
2026-09-02 09:29:08 +03:00
parent 5433b26465
commit 51aa446eee
2 changed files with 16 additions and 19 deletions

View File

@@ -12,16 +12,13 @@ export default defineConfig({
server: {
port: 4201,
host: 'localhost',
proxy: {
'/api': {
target: 'https://ema-api-dev.triaplc.com',
changeOrigin: true,
},
},
},
// server: {
// port: 4201,
// proxy: {
// '/api': {
// target: 'http://localhost:3000', // change from 'https://ema-api-dev.triaplc.com'
// changeOrigin: true,
// },
// },
// },
preview: { port: 4201, host: 'localhost' },
plugins: [react(), nxViteTsPaths()],
resolve: {

View File

@@ -9,16 +9,16 @@ export default defineConfig({
// built-in default.
envDir: "../../",
cacheDir: "../../node_modules/.vite/apps/portal",
server: { port: 4200, host: "localhost" },
// server: {
// port: 4200,
// proxy: {
// '/api': {
// target: 'http://localhost:3000', // change from 'https://ema-api-dev.triaplc.com'
// changeOrigin: true,
// },
// },
// },
server: {
port: 4200,
host: "localhost",
proxy: {
'/api': {
target: 'https://ema-api-dev.triaplc.com',
changeOrigin: true,
},
},
},
preview: { port: 4200, host: "localhost" },
plugins: [react(), nxViteTsPaths()],
resolve: {