Skip to content

Commit

Permalink
fix: don't process tslib with ngcc
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 committed Oct 21, 2021
1 parent 5cf363b commit 925b427
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lib/ng-package/ngcc-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
export class NgccProcessingCache {
private readonly processedModuleNames = new Set<string>();

constructor() {
this.populate();
}

private populate() {
// Workaround for
// [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports"
// field module resolution of the package at /Users/alanagius/git/ng-packagr/node_modules/chai/package.json.
// Update this package.json to use a subpath pattern like "./*".
for (const lib of ['chai', 'tslib']) {
this.processedModuleNames.add(lib);
}
}
hasProcessed(moduleName: string): boolean {
return this.processedModuleNames.has(moduleName);
}
Expand All @@ -21,5 +34,6 @@ export class NgccProcessingCache {

clear(): void {
this.processedModuleNames.clear();
this.populate();
}
}

0 comments on commit 925b427

Please sign in to comment.