首先,你需要在Vue2项目中安装pdfjs-dist库。推荐使用npm或yarn进行安装,并指定一个稳定的版本以避免潜在的兼容性问题。例如,可以安装版本2.0.943: bash npm install pdfjs-dist@2.0.943 # 或者 yarn add pdfjs-dist@2.0.943 2. 在Vue组件中引入pdfjs-dist 在你的Vue组件中,你需要引入pdf
npm install pdfjs-dist --save 报错按提示安装的: npm install --save babel-polyfill 也按网上说的把: main.js的第一行给了: import "babel-polyfill" 项目启动报错: ERROR Failed to compile with 1 error 16:24:33 error in ./node_modules/pdfjs-dist/build/pdf.js Module parse failed: Unexpected...
npm install pdfjs-dist --save 报错按提示安装的: npm install --save babel-polyfill 也按网上说的把: main.js的第一行给了: import "babel-polyfill" 项目启动报错: ERROR Failed to compile with 1 error 16:24:33 error in ./node_modules/pdfjs-dist/build/pdf.js Module parse failed: Unexpected...
项目启动报错: ERROR Failed to compile with 1 error 16:24:33 error in ./node_modules/pdfjs-dist/build/pdf.js Module parse failed: Unexpected token (405:14) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https:/...
npm install pdfjs-dist --save 报错按提示安装的: npm install --save babel-polyfill 也按网上说的把: main.js的第一行给了: import "babel-polyfill" 项目启动报错: ERROR Failed to compile with 1 error 16:24:33 error in ./node_modules/pdfjs-dist/build/pdf.js Module parse failed: Unexpected...