Hi I have a selected Figma node item’s as an array of image byte arrays in the ui. It is an html file. I have installed JSZIP via npm install jszip.
But when I try to refer jszip, it gives error.
I tried as below
Blockquote
<html>
<head>
<title>Zip Images</title>
<script src="node_modules/jszip/dist/jszip.min.js"></script>
</head>
<body>
<script>
function ui_f5_zipIt()
{
console.log(array_image_bytes)
const zip = new JSZip(); ///THROW ERROR HERE
}
</script>
Error is
VM489:83 Uncaught ReferenceError: JSZip is not defined
at ui_f5_zipIt (<anonymous>:83:21)
at window.onmessage (<anonymous>:21:13)
Please note I am working in figma desktop