Merge pull request #11474 from Snuffleupagus/pdfjs-dist-rm-dependencies

[api-minor] Remove the Webpack-only npm dependencies from `pdfjs-dist` (PR 11418 follow-up)
This commit is contained in:
Tim van der Meij 2020-01-06 23:07:53 +01:00 committed by GitHub
commit 3772e30f9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -12,8 +12,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
"use strict";
try {
require.resolve("worker-loader");
} catch (ex) {
throw new Error(
"Cannot find the `worker-loader` package, please make sure that it's correctly installed."
);
}
var pdfjs = require("./build/pdf.js");
var PdfjsWorker = require("worker-loader!./build/pdf.worker.js");

View File

@ -1548,12 +1548,6 @@ gulp.task(
homepage: DIST_HOMEPAGE,
bugs: DIST_BUGS_URL,
license: DIST_LICENSE,
dependencies: {
"worker-loader": "^2.0.0", // used in external/dist/webpack.json
},
peerDependencies: {
webpack: "^3.0.0 || ^4.0.0-alpha.0 || ^4.0.0", // from 'worker-loader'
},
browser: {
fs: false,
http: false,