function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Carlos CiceroCarlos Cicero 

lwc external libraries that dependes on each other

import { LightningElement } from 'lwc';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { loadStyle, loadScript } from 'lightning/platformResourceLoader';
import barcode from '@salesforce/resourceUrl/BarcodeJS'
import jdspdf from '@salesforce/resourceUrl/FusionJSpdf'
import FusionHTML2canvas from '@salesforce/resourceUrl/FusionHTML2canvas'
import Fusioncanvg from '@salesforce/resourceUrl/Fusioncanvg'
import Fusionrgbcolor from '@salesforce/resourceUrl/Fusionrgbcolor'

export default class PdfTest extends LightningElement {

    connectedCallback() {
        
       
        Promise.all([

           loadScript(this, Fusionrgbcolor  ),
           loadScript(this, barcode ) ,      
           loadScript(this, jdspdf  ) ,           
           loadScript(this, FusionHTML2canvas  ),
           loadScript(this, Fusioncanvg  )
           
            
       ]).then(() => {
            
           
           window.console.log('Files loaded.');
           var svgComponent = this.template.querySelector('svg');
           JsBarcode(svgComponent, '123123');
           
   
       }).catch( error => {
   
        if(error){

            window.console.log('Errors ' + error.message);

        }
        window.console.log('Errors ' );
           
           this.dispatchEvent(
               new ShowToastEvent({
                   title: 'Error updating record',
                   message: error,
                   variant: 'error'
               })
           );
       });
   
       }
}

Hi everyone.

 I am trying to load these external libraries that I have in separates static resource, It is only failing to load Fusioncanvg, I know that it depends on Fusionrgbcolor. I know that Fusionrgbcolor loads fine. 
How can load both?

Regards,
Carlos
Dushyant SonwarDushyant Sonwar
This might find silly but did you created the CSP Trusted sites . May be your static resource file is using some CDN urls. https://help.salesforce.com/articleView?id=sf.csp_trusted_sites.htm&type=5