I have an Angular 1.5.5 project that uses jspm
to fetch and bundle all front-end dependencies - angular
, angular-material
, angular-adal
, ngcomponentrouter
etc.
We're resolving all of these dependencies using the npm:
endpoint. The issue arises when we install angular-material
, as it pulls in 2nd dependency on angular
from github:angular/bower-angular
(instead of npm:angular
).
This can be replicated by running:
jspm install npm:angular
jspm install npm:angular-material
Of which the 2nd command outputs:
Looking up npm:angular-material
Updating registry cache...
Downloading npm:angular-material@1.1.0-rc4-master-06e7e99
Looking up github:angular/bower-angular
Looking up github:angular/bower-angular-messages
Looking up github:systemjs/plugin-css
Looking up github:angular/bower-angular-animate
Looking up github:angular/bower-angular-aria
ok Installed github:angular/bower-angular-messages@^1.5.3 (1.5.5)
ok Installed github:angular/bower-angular@^1.5.3 (1.5.5)
ok Installed github:angular/bower-angular-aria@^1.5.3 (1.5.5)
ok Installed github:angular/bower-angular-animate@^1.5.3 (1.5.5)
Resulting in angular being loaded twice by our UI - once from wwwroot/lib/github/angular
and once from wwwroot/lib/npm/angular@1.5.5
My question is this:
Is there any way to force the same angular
dependency to be resolved from only one source? How can I ensure that only a single dependency of angular 1.5.5 is loaded?