From b8218e14893dcdfb95e875c5853d30be093ea01d Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Thu, 14 Sep 2017 17:10:46 -0700 Subject: [PATCH] build: fix regex for matching imports for umd generation (#7093) --- tools/package-tools/build-bundles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/package-tools/build-bundles.ts b/tools/package-tools/build-bundles.ts index d65c3fe2dd7..2278a3fd334 100644 --- a/tools/package-tools/build-bundles.ts +++ b/tools/package-tools/build-bundles.ts @@ -147,7 +147,7 @@ export class PackageBundler { // secondary entry-points from the rollup globals because we want the UMD for this package // to include *all* of the sources for those entry-points. if (this.buildPackage.exportsSecondaryEntryPointsAtRoot) { - const importRegex = new RegExp(`@angular/${this.buildPackage.name}/.+`, 'g'); + const importRegex = new RegExp(`@angular/${this.buildPackage.name}/.+`); external = external.filter(e => !importRegex.test(e)); // Use the rollup-alias plugin to map imports of the form `@angular/material/button`