From c8909406a57c9309f78eb5394456ce8fe3fdd131 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 13 Sep 2023 17:49:21 +0000 Subject: [PATCH] fix(@angular-devkit/build-angular): correctly re-point RXJS to ESM on Windows Previously, the path matching and replacement did not consider non posix file systems like windows. --- .../src/tools/esbuild/rxjs-esm-resolution-plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/tools/esbuild/rxjs-esm-resolution-plugin.ts b/packages/angular_devkit/build_angular/src/tools/esbuild/rxjs-esm-resolution-plugin.ts index dfa28d14ad60..95c13c3026b0 100644 --- a/packages/angular_devkit/build_angular/src/tools/esbuild/rxjs-esm-resolution-plugin.ts +++ b/packages/angular_devkit/build_angular/src/tools/esbuild/rxjs-esm-resolution-plugin.ts @@ -39,7 +39,7 @@ export function createRxjsEsmResolutionPlugin(): Plugin { resolveDir, }); - result.path = result.path.replace('/dist/cjs/', '/dist/esm/'); + result.path = result.path.replace(/([\\/]dist[\\/])cjs([\\/])/, '$1esm$2'); return result; });