From d6953bd9401f1d5daef2be41e9bc039719054ca1 Mon Sep 17 00:00:00 2001 From: Yossi Yedid <31597463+yossiyedid@users.noreply.github.com> Date: Sun, 9 Nov 2025 11:46:54 +0200 Subject: [PATCH 1/2] use Angular's resolveExtensions We want to allow ng-packagr output (.mjs) to be used in federation --- libs/native-federation/src/utils/angular-esbuild-adapter.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/native-federation/src/utils/angular-esbuild-adapter.ts b/libs/native-federation/src/utils/angular-esbuild-adapter.ts index 42efcb0a..8249c2a0 100644 --- a/libs/native-federation/src/utils/angular-esbuild-adapter.ts +++ b/libs/native-federation/src/utils/angular-esbuild-adapter.ts @@ -301,6 +301,7 @@ async function runEsbuild( ngJitMode: 'false', }, ...(builderOptions.loader ? { loader: builderOptions.loader } : {}), + resolveExtensions: ['.ts', '.tsx', '.mjs', '.js', '.cjs'] }; const ctx = await esbuild.context(config); From c14092da080382ef5a431a5d3a2a2cc7f2ce195b Mon Sep 17 00:00:00 2001 From: Daniel4o Date: Fri, 21 Nov 2025 13:20:15 +0200 Subject: [PATCH 2/2] fix(native-federation): allow esbuild to resolve .mjs for federated builds --- libs/native-federation/src/utils/angular-esbuild-adapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/native-federation/src/utils/angular-esbuild-adapter.ts b/libs/native-federation/src/utils/angular-esbuild-adapter.ts index 8249c2a0..54ff0bab 100644 --- a/libs/native-federation/src/utils/angular-esbuild-adapter.ts +++ b/libs/native-federation/src/utils/angular-esbuild-adapter.ts @@ -301,7 +301,7 @@ async function runEsbuild( ngJitMode: 'false', }, ...(builderOptions.loader ? { loader: builderOptions.loader } : {}), - resolveExtensions: ['.ts', '.tsx', '.mjs', '.js', '.cjs'] + resolveExtensions: ['.ts', '.tsx', '.mjs', '.js', '.cjs', '.json', '.jsx', '.css'], }; const ctx = await esbuild.context(config);