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

vue-pdf打包会出现两个js文件不在static文件夹里,发布到线上pdf的文件也无法解析

Open kyraxiao opened this issue 5 years ago • 10 comments

vue-pdf打包会出现两个js文件不在static文件夹里,发布到线上pdf的文件也无法解析 f2877b02a4e9d4f6a4260324491c1cc

kyraxiao avatar Dec 13 '19 03:12 kyraxiao

Please use English language.

FranckFreiburger avatar Jan 13 '20 09:01 FranckFreiburger

vue-pdf package will appear two js files are not in the static folder, and the files published to the online pdf cannot be parsed

kyraxiao avatar Jan 13 '20 09:01 kyraxiao

I have this problem how to solve this problem, there is no solution. Why can't you parse it online and report an error "Uncaught SyntaxError: Unexpected token '<'"

zhulinlin12 avatar Mar 10 '20 07:03 zhulinlin12

我有这个问题怎么解决这个问题,没有解决方法。您为什么不能在线解析它并报告错误“ Uncaught SyntaxError:Unexpected token'<'” @FranckFreiburger

zhulinlin12 avatar Mar 10 '20 07:03 zhulinlin12

I also encountered the same problem. Is there a solution?

songjishuai avatar May 27 '20 01:05 songjishuai

if (process.env.VUE_ENV === "server") { var PDFJS = require("pdfjs-dist/build/pdf.js"); PDFJS.PDFJS.disableWorker = true; } else { var PDFJS = require("pdfjs-dist/webpack.js"); }

to:

if (process.env.VUE_ENV === "server") { var PDFJS = require("pdfjs-dist/build/pdf.js"); PDFJS.disableWorker = true; } else { var PDFJS = require("pdfjs-dist/webpack.js"); }

songjishuai avatar May 27 '20 05:05 songjishuai

How to fix this problem without changing the dependent packages

makeitease avatar Sep 28 '20 02:09 makeitease

Need to change the Webpack configuration, but expect an official fix

Timo-coder-jeby avatar Feb 22 '21 08:02 Timo-coder-jeby

Need to change the Webpack configuration, but expect an official fix

请问这个Webpack 配置怎么修改

liyeyu avatar May 31 '21 07:05 liyeyu

https://www.jianshu.com/p/19d0a05eb870

ZSJ1314 avatar Sep 24 '21 07:09 ZSJ1314