From 41178ba8419f8ed32a5dc16fb89a93e67a87f59a Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 7 Mar 2025 17:50:32 +0100 Subject: [PATCH] change(ui): webpack config to use env vars --- frontend/webpack.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/webpack.config.ts b/frontend/webpack.config.ts index b54b11c7b..0eb1e86ca 100644 --- a/frontend/webpack.config.ts +++ b/frontend/webpack.config.ts @@ -8,8 +8,8 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import CompressionPlugin from "compression-webpack-plugin"; import { EsbuildPlugin } from 'esbuild-loader'; -const dotenv = require('dotenv').config({ path: __dirname + '/.env' }) const isDevelopment = process.env.NODE_ENV !== 'production' +const dotenv = require('dotenv').config({ path: __dirname + (isDevelopment ? '/.env' : '/.env.production') }); const stylesHandler = MiniCssExtractPlugin.loader; const ENV_VARIABLES = JSON.stringify(dotenv.parsed); import pathAlias from './path-alias';