1

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.

2
  • 1
    helpful? blog.mastykarz.nl/… Sep 16, 2016 at 15:11
  • Yea it does. So essentially don't bundle external dependencies because of what I stated above, unless you really need to or can't use a CDN. Sounds good. Thanks.
    – Batman
    Sep 16, 2016 at 16:18

1 Answer 1

1

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.