vue pdfjs-dist Module parse failed: Unexpected token (2267:39)


使用 pdfjs-dist 报错

Module parse failed: Unexpected token (2267:39)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| async getXfa() {
> return this._transport._htmlForXfa?.children[this._pageIndex] || null;
| }

更换版本为2.0.943即可

运行 npm i pdfjs-dist@2.0.943 

package.json

"dependencies": {
...
"pdfjs-dist": "^2.0.943",
...
},


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM