I am trying to use this library from Salesforce Lightning Web Component, I imported the downloaded zip file as a static resource and then imported the module.js into my javascript file. I am running into issues. Below is my code and explanation
@salesforce/resourceUrl/zipcelx - refers to the static resource that has entire downloaded zip reference.
In salesforce we need to call loadScript for loading individual script files for using them
import { LightningElement, track, api} from 'lwc';
import zipcelx from '@salesforce/resourceUrl/zipcelx';
import getFieldsMetadata from '@salesforce/apex/ObjectFieldsGraphController.getFieldsMetadata'
import { loadScript } from 'lightning/platformResourceLoader';
export default class SpreadSheetGenerator extends LightningElement {
Hi,
I am trying to use this library from Salesforce Lightning Web Component, I imported the downloaded zip file as a static resource and then imported the module.js into my javascript file. I am running into issues. Below is my code and explanation
@salesforce/resourceUrl/zipcelx - refers to the static resource that has entire downloaded zip reference. In salesforce we need to call loadScript for loading individual script files for using them
import { LightningElement, track, api} from 'lwc'; import zipcelx from '@salesforce/resourceUrl/zipcelx'; import getFieldsMetadata from '@salesforce/apex/ObjectFieldsGraphController.getFieldsMetadata' import { loadScript } from 'lightning/platformResourceLoader';
export default class SpreadSheetGenerator extends LightningElement {
}