Which external Javascript libraries work with Lightning Locker Service?

Components often seem to work with external libraries until the Locker Service is enabled. What libraries work with locker service enabled and where can I go to find out?

Answer

Important: Libraries that do not support strict mode will not work with LockerService enabled.

Salesforce is testing libraries to determine which ones currently will work with Locker Service. The ones they know of have been published in a Salesforce Developer Blog Post titled LockerService and Lightning Container Component: Securely Using Third-Party Libraries in Lightning Components.

Here’s a summary of the ones listed at present:

|– Libraries Known to work —|
|—– with Locker Service ——|
——————————————-
| Library |————–| Library |
| Name |—————| Version |
——————————————-
| React |—————–| 0.14.8 |
| ChartJS |—————-| 2.1.4 |
| D3 |———————| 4.4.0 |
| RxJS |-| Latest as of 12/5/16 |
| Leaflet |—–| 0.7.7 and 1.0.2 |
| Numeral.js |———–| 2.1.4 |
| Underscore.js |——–| 1.8.3 |
| FullCalendar |———| 3.1.0 |
| Gauge.js |————–| 1.2.1 |
| jQuery |—–| 2.2.2 and 2.2.4 |
| jQuery UI |———–| 1.11.4 |
| DataTables |——–| 1.10.12 |
| Select2 |—————| 4.0.3 |
———————————–

Important: Do not try to mix different versions of libraries in your page code. Do not use libraries to do things that can be done natively using the LDS. This is especially true for jQuery. See examples in the referenced document. Learn to use the LDS instead.

Attribution
Source : Link , Question Author : crmprogdev , Answer Author : crmprogdev

Leave a Comment