Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue2 + vite require is not defined #410

Open
wangzz-lzw opened this issue Jul 13, 2023 · 3 comments
Open

vue2 + vite require is not defined #410

wangzz-lzw opened this issue Jul 13, 2023 · 3 comments

Comments

@wangzz-lzw
Copy link

No description provided.

@Villalbad10
Copy link

Villalbad10 commented Jun 19, 2024

i have same error. Is there solution?

@nwebe21
Copy link

nwebe21 commented Sep 27, 2024

Still no solution huhu

@richterdennis
Copy link

Do solve this I created my own pdf-viewer.vue file:

<style src="vue-pdf/src/annotationLayer.css"></style>
<script>
import componentFactory from 'vue-pdf/src/componentFactory.js';
import pdfjsWrapper  from 'vue-pdf/src/pdfjsWrapper.js';
import PDFJS from 'pdfjs-dist/build/pdf.js';
import PdfjsWorker from 'pdfjs-dist/build/pdf.worker.entry';

PDFJS.GlobalWorkerOptions.workerSrc = PdfjsWorker;
const component = componentFactory(pdfjsWrapper(PDFJS));

export default component;
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants