Update webpack.js to support browsers that do not have the Web Workers API
This commit is contained in:
parent
8d55e6a01d
commit
a0b7f84461
5
external/dist/webpack.js
vendored
5
external/dist/webpack.js
vendored
@ -16,6 +16,11 @@
|
||||
|
||||
var pdfjs = require('./build/pdf.js');
|
||||
var PdfjsWorker = require('worker-loader!./build/pdf.worker.js');
|
||||
|
||||
if (typeof window !== 'undefined' && 'Worker' in window) {
|
||||
pdfjs.PDFJS.workerPort = new PdfjsWorker();
|
||||
} else {
|
||||
pdfjs.PDFJS.disableWorker = true;
|
||||
}
|
||||
|
||||
module.exports = pdfjs;
|
||||
|
Loading…
Reference in New Issue
Block a user