vue-pdf icon indicating copy to clipboard operation
vue-pdf copied to clipboard

Does this package support vue3 and vite

Open mankeheaven opened this issue 4 years ago • 11 comments

Does this package support vue3 and vite?

mankeheaven avatar Apr 29 '21 10:04 mankeheaven

Does this package support vue3 and vite?

npm i vue3-pdf

suadik avatar Apr 30 '21 08:04 suadik

vue3-pdf

image

vue3-pdf doesn't work. I catch that error.

zoh avatar Apr 30 '21 14:04 zoh

something else other than process is wrong I use script tag to handle this but mozzila/pdf can not render correctly with chinese maybe I should create a issue with mozzila/pdf ?

image

The correct chinese is '什么是PBR?'

mankeheaven avatar May 06 '21 03:05 mankeheaven

Hm, vue3-pdf does not come with any public repo and actually fails with

ERROR in ./node_modules/pdfjs-dist-sig/es5/build/pdf.worker.js (./node_modules/vue3-pdf/node_modules/worker-loader/dist/cjs.js!./node_modules/pdfjs-dist-sig/es5/build/pdf.worker.js)
Module build failed (from ./node_modules/vue3-pdf/node_modules/worker-loader/dist/cjs.js):
Error: MainTemplate.hooks.hotBootstrap has been removed (use your own RuntimeModule instead)

I'd love to see the "official" vue-pdf to support vuejs3.

ahoiroman avatar May 18 '21 10:05 ahoiroman

I do have vue3-pdf working, however the events are not triggered...

JBtje avatar May 21 '21 09:05 JBtje

Hm, vue3-pdf does not come with any public repo and actually fails with

ERROR in ./node_modules/pdfjs-dist-sig/es5/build/pdf.worker.js (./node_modules/vue3-pdf/node_modules/worker-loader/dist/cjs.js!./node_modules/pdfjs-dist-sig/es5/build/pdf.worker.js)
Module build failed (from ./node_modules/vue3-pdf/node_modules/worker-loader/dist/cjs.js):
Error: MainTemplate.hooks.hotBootstrap has been removed (use your own RuntimeModule instead)

I'd love to see the "official" vue-pdf to support vuejs3.

I don't know if it's relevant but the version of worker-loader for vue-pdf and pdfjs-dist are very different. This error hints at a deprecated function in webpack 5 but I can't find where it's called here.

Also, #310 might solve the issue.

EHadoux avatar Jun 08 '21 21:06 EHadoux

I do have vue3-pdf working, however the events are not triggered...

I have modified the vue3-pdf package, removed mitt package and make use of native emitting. For me, this package now works and events are emitted correctly. I'm using it in Vue3 / webpack 5.39.

https://github.com/JBtje/vue3pdf

JBtje avatar Jun 17 '21 06:06 JBtje

Any options for those of us that are using vite with vue 2?

runarberg avatar Jul 13 '21 00:07 runarberg

I'd like to see official support, or at least a semi maintained fork of this repo that adds vue3 support. The one published to npm is mysterious in origin.

It's unclear to me, but I think @leafront published the vue3-pdf..

@leafront Did you publish vue3-pdf? If so, thank you. Can we help you host your fork on github and examine it for a pull request?

scvnc avatar Sep 02 '21 17:09 scvnc

I'd like to see official support, or at least a semi maintained fork of this repo that adds vue3 support. The one published to npm is mysterious in origin.

It's unclear to me, but I think @leafront published the vue3-pdf..

@leafront Did you publish vue3-pdf? If so, thank you. Can we help you host your fork on github and examine it for a pull request?

https://github.com/JBtje/vue3pdf even updated it today to use the latest of pdfjs. You can find the package on npm as well.

JBtje avatar Sep 02 '21 19:09 JBtje

@JBtje My bad... I was info blind and skimming through a lot of threads and somehow missed your comment :) I see that vue3-pdf and vue3pdf are different forks.

Looks slick, Thanks!

scvnc avatar Sep 03 '21 04:09 scvnc