You need to sign in to do that
Don't have an account?
Asad Mahmood 6
Third party js library will not load in lwc
Hi guys,
I have been trying to third party js file called oidc-client.js from static resource and unfortunately will not load the script. However, when I try to load jquery js file, it will load. I can see in the network tab of Google chrome developer tools that oidc js was loaded successfully.
There's no error stack other than undefined.
I downloaded the file from https://github.com/IdentityModel/oidc-client-js
Any ideas why It won't loadscript??
Sorry I am not leaving any code snippet because I am raising this issue using my phone.
Many thanks
Asad
I have been trying to third party js file called oidc-client.js from static resource and unfortunately will not load the script. However, when I try to load jquery js file, it will load. I can see in the network tab of Google chrome developer tools that oidc js was loaded successfully.
There's no error stack other than undefined.
I downloaded the file from https://github.com/IdentityModel/oidc-client-js
Any ideas why It won't loadscript??
Sorry I am not leaving any code snippet because I am raising this issue using my phone.
Many thanks
Asad
You can use third-party JavaScript libraries with Lightning web components. For example, use a library with interactive charts and graphs or one to reduce code complexity.
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.js_third_party_library
The above blog have complete information.
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Thanks.
Hi Abishek,
Please see above code, the library will not load, it works fine in classic page but not in LWC.
If you have time then could you please try from your side in sample app to see if it loads
here's the link: https://github.com/IdentityModel/oidc-client-js/tree/dev/dist
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.security_lwsec_intro
Thank you Dmitry Bakovich 7!!
https://developer.salesforce.com/forums/?id=9062I000000XrWiQAK