1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #7189 from yurydelendik/webpack-browserify-love

Removing "entry-loader" dependency from webpack.
This commit is contained in:
Yury Delendik 2016-04-13 08:42:11 -05:00
commit fa2f80d0fd
12 changed files with 45 additions and 17 deletions

View file

@ -29,8 +29,6 @@ if (typeof window === 'undefined') {
useRequireEnsure = true;
}
if (typeof __webpack_require__ !== 'undefined') {
// Webpack - get/bundle pdf.worker.js as additional file.
workerSrc = require('entry?name=[hash]-worker.js!./pdf.worker.js');
useRequireEnsure = true;
}
if (typeof requirejs !== 'undefined' && requirejs.toUrl) {

18
src/pdf.worker.entry.js Normal file
View file

@ -0,0 +1,18 @@
/* Copyright 2016 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(typeof window !== 'undefined' ? window : {}).pdfjsDistBuildPdfWorker =
require('./pdf.worker.js');