vue-cli引入pdfjs-dist报错,查找几个小时还是无果

vue-cli引入pdfjs-dist

后台接口返回pdf文件转图片后打印,引入pdfjs-dist后npm run dev报错

vue.config.js中babel配置

    module: {

rules: [{

test: /\.(html)(\?.*)?$/,

use: "vue-html-loader"

}, {

test: /\.js$/,

use: "babel-loader",

include: [resolve('src'), resolve('node_modules/pdfjs-dist/build')]

}]

},

transpileDependencies: ['pafjs-dist']

报错提示

vue-cli引入pdfjs-dist报错,查找几个小时还是无果

引入transpileDependencies去解析node_modules文件会报错
vue-cli引入pdfjs-dist报错,查找几个小时还是无果

以上是 vue-cli引入pdfjs-dist报错,查找几个小时还是无果 的全部内容, 来源链接: utcz.com/p/935444.html

回到顶部