Forum Discussion
kath patterson
Oct 31, 2017Iron Contributor
SPFx - including external libraries like jquery
Hopefully this might save people some of the time I wasted trying to get a clear guidance on what to do for this. There are lots of old posts around that relate to earlier times.
This helpful Ignite session makes it really clear what to use when and how
https://myignite.microsoft.com/sessions/53866
The bit to notice is that modules and non-modules are treated differently.
Rencore have done a free script check to help you get the right code https://rencore.com/sharepoint-framework/script-check/
This is a summary of what the video outlines for jquery and an extension script
jquery and extn declared
import the jquery and assign to dollar because the extension script will assume that symbol
require the extension
the you can reference the extension as normal
he does talk about "typings" in the video but my Typescript isn't good enough to grasp what this would look like and he doesn't explain. Maybe a Typescript guru can elaborate?
No RepliesBe the first to reply