Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SharePoint Development with the SharePoint Framework

You're reading from   SharePoint Development with the SharePoint Framework Design and implement state-of-the-art customizations for SharePoint

Arrow left icon
Product type Paperback
Published in Sep 2017
Publisher Packt
ISBN-13 9781787121430
Length 386 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Jussi Roine Jussi Roine
Author Profile Icon Jussi Roine
Jussi Roine
Olli Jääskeläinen Olli Jääskeläinen
Author Profile Icon Olli Jääskeläinen
Olli Jääskeläinen
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Introducing SharePoint Online for Developers FREE CHAPTER 2. Developing Solutions for SharePoint 3. Getting Started with the SharePoint Framework 4. Building Your First Web Part 5. Using Visual Studio Code and Other Editors 6. Packaging and Deploying Solutions 7. Working with SharePoint Content 8. Working with the Web Part Property Pane 9. Using React and Office UI Fabric React Components 10. Working with Other JavaScript Frameworks 11. Troubleshooting and Debugging SharePoint Framework Solutions 12. SharePoint APIs and Microsoft Graph 13. The Future of SharePoint Customizations

Loading external packages

If your project requires external libraries, such as jQuery or similar, commonly used libraries, you might consider loading these from CDN. You can always bundle them within your project, but this means that your packages that are deployed will grow in size. Also, maintaining or updating these external libraries quickly becomes time-consuming, as you need to manually track what version of each library is being loaded on a page.

A solution for this is to load these external libraries from a CDN. The process is quite straightforward:

  1. First, install the npm package for your library. In our example, this would be jQuery:
npm install jquery --save
  1. Next, run the npm install to ensure that all packages are updated:
npm i 
  1. Then, open the config/config.json file within your project and look up the externals portion of the file. Update this to reflect that you'll load jQuery from a CDN, with a globalName of jQuery. Your external configuration in the file should...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime