You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 9, 2021. It is now read-only.
PdfjsLib library uses worker-loader to load pdf worker.
Expecting for webpack to build just fine.
Actual Behavior
Building gives the following error:
ERROR in ./node_modules/pdfjs-dist/build/pdf.worker.js (./node_modules/worker-loader/dist/cjs.js?esModule=false&filename=[name].js!./node_modules/pdfjs-dist/build/pdf.worker.js)
Module build failed (from ./node_modules/worker-loader/dist/cjs.js):
TypeError: chunkFilename.replace is not a function
at getDefaultChunkFilename (/node_modules/worker-loader/dist/utils.js:23:24)
at Object.pitch (/node_modules/worker-loader/dist/index.js:61:108)
Expected Behavior
PdfjsLib library uses worker-loader to load pdf worker.
Expecting for webpack to build just fine.
Actual Behavior
Building gives the following error:
ERROR in ./node_modules/pdfjs-dist/build/pdf.worker.js (./node_modules/worker-loader/dist/cjs.js?esModule=false&filename=[name].js!./node_modules/pdfjs-dist/build/pdf.worker.js)
Module build failed (from ./node_modules/worker-loader/dist/cjs.js):
TypeError: chunkFilename.replace is not a function
at getDefaultChunkFilename (
/node_modules/worker-loader/dist/utils.js:23:24)/node_modules/worker-loader/dist/index.js:61:108)at Object.pitch (
webpack compiled with 1 error
Code
How Do We Reproduce?
Try to run the above code with the versions mentioned