From the course: SharePoint Framework for Developers: 4 Managing External Libraries

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Externalize scripts using externalize and config.json

Externalize scripts using externalize and config.json

From the course: SharePoint Framework for Developers: 4 Managing External Libraries

Start my 1-month free trial

Externalize scripts using externalize and config.json

- [Instructor] I've just shown you a different ways of loading different scripts programmatically, using SPComponentLoader. However, you can also choose to tell SharePoint Framework that you wish to load external libraries and you wish to do so, say non programmatically. That you're just saying that this is an external dependence. But you're basically telling SharePoint Framework that you don't want to use the npm module, that is not the source for your scripts, but you want to point to a link. So let me go ahead and run the SharePoint Framework Yeoman Generator and just accept all defaults. And I'll show you how you can include jQuery in a web part and the code that we write to here will be just the same as before. That we will not use SPComponentLoader. Let's see how. Okay, so since I do intend to use jQuery, it would be nice to have IntelliSense, and the simplest way to do that is simply add these types into dev dependencies. So that's number one. In the background here, I'll go…

Contents