I'm trying to load a library into a lightning web component. The library itself has comments in it that say it shouldn't run in strict mode which I think is what's causing my issue since I can get the library to run fine in a standard web app. Is there any way to load libraries without forcing them into strict mode in a lightning web component?


No. All libraries are loaded in strict mode as a security feature. You will need to either fix the library to be strict mode compliant (use eslint for help with this), or use an alternative library. Most reasonably written libraries can be made strict-mode compatible with minimal changes to the code base, but without knowing more, it's hard to tell if it can be fixed, and how much effort it would take.

  • Thanks, I was afraid of that. It's qlik's nebula.js library qlik.dev/libraries-and-tools that I was trying to load. I guess my only options are to modify the library or use a canvas app – Scott Morrison Sep 15 '20 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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