I have the LWC and I need download the folder with files in zip format. I found JSZip library.Downloaded this file (js). Added its to static resources and import its on my LWC and loaded this file used loadScript:
import JSZip from "@salesforce/resourceUrl/jszip"
...
async connectedCallback(){
await loadScript(this, JSZip)
.then(()=>{
console.log('success load');
})
But when i create a zip the system throws an error:
async downloadFolder(event){
const folder = event.detail;
const zip = new JSZip(); <-- there is problem in this place!
!Uncaught (in promise)
Maybe somebody knows what the problem is...