From a564329eb8b075d4f2874bffc331f0c99103374c Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sat, 4 Jul 2026 20:19:31 +0700 Subject: [PATCH] fix(api): file replacements was not working --- apps/api/webpack.config.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/api/webpack.config.js b/apps/api/webpack.config.js index 5a882bb8e..e59eee0bf 100644 --- a/apps/api/webpack.config.js +++ b/apps/api/webpack.config.js @@ -1,4 +1,5 @@ const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin'); +const path = require('path'); // These options were migrated by @nx/webpack:convert-to-inferred from // the project.json file and merged with the options in this file @@ -18,8 +19,11 @@ const configValues = { extractLicenses: true, fileReplacements: [ { - replace: './src/environments/environment.ts', - with: './src/environments/environment.prod.ts' + replace: path.resolve(__dirname, './src/environments/environment.ts'), + with: path.resolve( + __dirname, + './src/environments/environment.prod.ts' + ) } ], generatePackageJson: true,