vue 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;
|   }

解决:

修改: package-lock.json 然后重新: npm i

"pdfjs-dist": {
      "version": "2.0.943",
      "resolved": "https://registry.npm.taobao.org/pdfjs-dist/download/pdfjs-dist-2.0.943.tgz",
      "integrity": "sha1-MvuaLYY99aHYlSGgs82QDBbn7d4=",
      "requires": {
        "node-ensure": "^0.0.0",
        "worker-loader": "^2.0.0"
      }
    },
Logo

前往低代码交流专区

更多推荐