i have a component lightning and i import 2 scripts "PDF.js" and "scripts.js" my static resource have 3 files zip "PDF.js", "script.js" and "worker.js"
<aura:component >
<ltng:require scripts="{!$Resource.pdf + '/pdf.js'}"/>
<ltng:require scripts="{!$Resource.pdf + '/script.js'}"/>
<input id="inputFile" type="file" onchange="convertToBase64();" />
<div id="data"></div>
</aura:component>
in my script.js static resource i call my worker.js
pdfjsLib.workerSrc = 'worker.js';
but i have a error
Uncaught ReferenceError: pdfjsLib is not defined throws at https://componentstudy-dev-ed.lightning.force.com/resource/1579614876000/olianiTrailhead__pdf/script.js:1:1 ReferenceError: pdfjsLib is not defined
at script.js:1
can someone help me?