diff --git a/.eslintrc b/.eslintrc index 6187b253d..d034a3ce6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -12,8 +12,8 @@ globals: { "PDFJSDev": false, - "require": false, "exports": false, + "SystemJS": false, }, "rules": { diff --git a/examples/helloworld/hello.js b/examples/helloworld/hello.js index 3571b59a6..b4421b6d0 100644 --- a/examples/helloworld/hello.js +++ b/examples/helloworld/hello.js @@ -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'; diff --git a/examples/helloworld/index.html b/examples/helloworld/index.html index 4b44fd21c..e27316eac 100644 --- a/examples/helloworld/index.html +++ b/examples/helloworld/index.html @@ -2,7 +2,8 @@
- + + diff --git a/examples/svgviewer/index.html b/examples/svgviewer/index.html index 70bf357ed..2b19c29f7 100644 --- a/examples/svgviewer/index.html +++ b/examples/svgviewer/index.html @@ -6,7 +6,8 @@