FranckFreiburger / vue-pdf

vue.js pdf viewer
MIT License
2.23k stars 524 forks source link

Package not compatible with Vue cli version 5.x #363

Open dvago opened 2 years ago

dvago commented 2 years ago

The newer version of vue-cli 5.x migrates from webpack 4 to webpack 5, the newer version of webpack does change the support for web workers.

So, the latest version of vue-pdf throws the following error:

ERROR in ./node_modules/pdfjs-dist/es5/build/pdf.worker.js (./node_modules/vue-pdf/node_modules/worker-loader/dist/cjs.js!./node_modules/pdfjs-dist/es5/build/pdf.worker.js)

Module build failed (from ./node_modules/vue-pdf/node_modules/worker-loader/dist/cjs.js):
Error: MainTemplate.hooks.hotBootstrap has been removed (use your own RuntimeModule instead)

Would you please update this package to make it run with vue-cli 5?

liu-guo-jing commented 2 years ago

same problem as you, do I have to downgrade to VUE-CLI4.0

YSoli commented 2 years ago

Same issue here while migrating to vue-cli 5.x

kstraszewski commented 2 years ago

Same here

image
xuxusheng commented 2 years ago

same +1

EugeneKuzmin commented 2 years ago

+1

Glandos commented 2 years ago

This is strange. I don't know what I did, but it works for me. However, it uses worker-loader which outputs DEP_WEBPACK_COMPILATION_CACHE and DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_INDEXER with Webpack 5 brought by vue-cli 5.

Byteschmiede commented 2 years ago

same +1

dvago commented 2 years ago

@liugj101 I ended up forking the project, cleaning up the code and make it work for vue-cli 5, this vue-pdf project is clearly dead, it's pretty pointless waiting for any maintainer doing anything.

cwilby commented 2 years ago

@dvago Are you able to share those changes, or was only a catch call needed? https://github.com/dvago/vue-pdf

dvago commented 2 years ago

Not really, I created a package within my company git account and stripped out lots of features that we don't use to run it as simple as possible, so the package is not called vue-pdf anymore and it's not public.

I don't think it makes sense for me to publish a clone of it as I'm not going to be able to maintain it or keep up with the eventual broad public requests to be fair, hope that makes sense.

MoNaiZi commented 2 years ago

same +1

cwilby commented 2 years ago

@MoNaiZi This package works well - https://github.com/hrynko/vue-pdf-embed

chenweigh commented 1 year ago

+1 ERROR in ./node_modules/pdfjs-dist/es5/build/pdf.worker.js (./node_modules/vue-pdf/node_modules/worker-loader/dist/cjs.js!./node_modules/pdfjs-dist/es5/build/pdf.worker.js)

ziyang314 commented 7 months ago

+1

shubhammatta commented 1 month ago

+1