wardbell / subsink

RxJS subscription sink for unsubscribing gracefully in a component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Subsink uses CommonJS modules, which throws a warning when using Angular 10

elliotleelewis opened this issue · comments

To remove the warning, we should be including an ESModule compile of the package too.

Here's some extra info: https://angular.io/guide/build#configuring-commonjs-dependencies

Yep, I'm having the same warning from ng 10 - WARNING in C:\Work\Src\angular\sample-projects\projects\ShoppingRecipes\src\app\header\header.component.ts depends on SubSink. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Any idea on when the change is gonna be implemented?

+1 Would be great if this could be implemented

One solution is to include this in your angular.json

"architect" : {
    "build" : {
        "options" : {
            "allowedCommonJsDependencies": [
                "subsink"
            ]
        }
    }
}

Yep I keep getting this warning since I moved to Angular 10 :'(

+1 for getting this fixed