This example of using D3 combines the loadScript in the connectedCallback with the code that uses D3, initializeD3 here:

renderedCallback() {
        loadScript(this, D3 + '/d3.v5.min.js'),
        loadStyle(this, D3 + '/style.css')
        .then(() => {

I want to use JEXL in multiple components so ideally would just like to import a reference to it where needed and ideally have it pre-cached before first use. (JEXL is working fine inside LWCs.)

What does that look like in LWCs?


Your Answer

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

Browse other questions tagged or ask your own question.