diff --git a/external/dist/webpack.js b/external/dist/webpack.js index d1e1f4250..6ac8fd69d 100644 --- a/external/dist/webpack.js +++ b/external/dist/webpack.js @@ -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"); diff --git a/gulpfile.js b/gulpfile.js index 60a9a4f8e..fcf570759 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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,