Fix environment variable casting (#4855)

Fixes #4628
This commit is contained in:
Félix Malfait
2024-04-05 18:15:47 +02:00
committed by GitHub
parent bbdb926687
commit bffd73e391
8 changed files with 21 additions and 37 deletions

View File

@ -1,17 +1,14 @@
import { ConfigService } from '@nestjs/config';
import * as fs from 'fs';
import * as path from 'path';
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
const environmentService = new EnvironmentService(new ConfigService());
import { config } from 'dotenv';
config();
export function generateFrontConfig(): void {
const configObject = {
window: {
_env_: {
REACT_APP_SERVER_BASE_URL: environmentService.get('SERVER_URL'),
REACT_APP_SERVER_BASE_URL: process.env.SERVER_URL,
},
},
};