mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Replaces RequireJS to SystemJS.
This commit is contained in:
parent
54e86f441b
commit
5b50e0d414
15 changed files with 118 additions and 64 deletions
|
@ -1,8 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
// In production, the bundled pdf.js shall be used instead of RequireJS.
|
||||
require.config({paths: {'pdfjs': '../../src'}});
|
||||
require(['pdfjs/display/api', 'pdfjs/display/global'], function (api, global) {
|
||||
// In production, the bundled pdf.js shall be used instead of SystemJS.
|
||||
Promise.all([SystemJS.import('pdfjs/display/api'),
|
||||
SystemJS.import('pdfjs/display/global')])
|
||||
.then(function (modules) {
|
||||
var api = modules[0], global = modules[1];
|
||||
// In production, change this to point to the built `pdf.worker.js` file.
|
||||
global.PDFJS.workerSrc = '../../src/worker_loader.js';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue