You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why is the name of a package still undefined after importing it from node module in SFC?
code looks like:
<template>
<div>
this is pdf
</div>
</template>
<script setup>
import * as pdfjsLib from "pdfjs-dist/legacy/build/pdf.js"
console.log(window);
console.log(window.pdfjsLib);
console.log(pdfjsLib);
</script>
The window object contains pdfjsLib, but the variable pdfjsLib is still undefined
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Why is the name of a package still undefined after importing it from node module in SFC?
code looks like:
The window object contains pdfjsLib, but the variable pdfjsLib is still undefined
Beta Was this translation helpful? Give feedback.
All reactions