문제

If I have an SPFx webpart and that webpart uses these dependencies:

  • jQuery
  • jQueryUI
  • Angular
  • LoDash

Then I have another SPFx webpart and that one uses:

  • jQuery
  • jQueryUI
  • React
  • Moment

If I load both those webparts on my page, I would be loading two bundles on the page. But both bundles have jQuery and jQueryUI. Is that not inefficient and could it cause conflicts?

I assume it's not going to cause a conflict but I'm concerned about loading duplicate libraries in terms of network consumption. I understand it's minified and likely cached through a CDN but still, not very DRY.

도움이 되었습니까?

해결책

Right - you don't want to make those libraries bundled internally. You want them to be referenced externally.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top