From a93451bd327effa8875a30bee48f49de3aad282d Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 13 Nov 2019 17:13:05 +0200 Subject: [PATCH] fix(ngcc): add default config for `ng2-dragula` The `dist/` directory has a duplicate `package.json` pointing to the same files, which (under certain configurations) can causes ngcc to try to process the files twice and fail. This commit adds a default ngcc config for `ng2-dragula` to ignore the `dist/` entry-point. Fixes #33718 --- .../ngcc/src/packages/configuration.ts | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/compiler-cli/ngcc/src/packages/configuration.ts b/packages/compiler-cli/ngcc/src/packages/configuration.ts index 141938e3c9057..c8be27ca2f6d6 100644 --- a/packages/compiler-cli/ngcc/src/packages/configuration.ts +++ b/packages/compiler-cli/ngcc/src/packages/configuration.ts @@ -84,15 +84,22 @@ export interface NgccEntryPointConfig { */ export const DEFAULT_NGCC_CONFIG: NgccProjectConfig = { packages: { - // Add default package configuration here. For example: - // '@angular/fire@^5.2.0': { - // entryPoints: { - // './database-deprecated': { - // ignore: true, - // }, - // }, - // }, - } + // Add default package configuration here. For example: + // '@angular/fire@^5.2.0': { + // entryPoints: { + // './database-deprecated': {ignore: true}, + // }, + // }, + + // The `dist/` directory has a duplicate `package.json` pointing to the same files, which (under + // certain configurations) can causes ngcc to try to process the files twice and fail. + // Ignore the `dist/` entry-point. + 'ng2-dragula': { + entryPoints: { + './dist': {ignore: true}, + }, + }, + }, }; interface VersionedPackageConfig extends NgccPackageConfig {