Skip to content

build: individual umd files include other entry-points. #7976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tools/package-tools/build-bundles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ export class PackageBundler {
let external = Object.keys(rollupGlobals);
external.splice(external.indexOf('tslib'), 1);

// If each secondary entry-point is re-exported at the root, we want to exlclude those
// 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) {
// If each secondary entry-point is re-exported at the root, we want to exclude those
// secondary entry-points from the rollup globals because we want the UMD for the
// primary entry-point to include *all* of the sources for those entry-points.
if (this.buildPackage.exportsSecondaryEntryPointsAtRoot &&
config.moduleName === `ng.${this.buildPackage.name}`) {

const importRegex = new RegExp(`@angular/${this.buildPackage.name}/.+`);
external = external.filter(e => !importRegex.test(e));

Expand Down