[Webpack] Chunk for worker file is not created
See original GitHub issueWhen using webpack, the chunk that should be populated for the worker.js file does not exist and the dynamic load of the worker fails when pdfjs is used.
Also, when webpack finishes I have a chunk that contains the following:
webpackJsonp([1],{
/***/ 92:
/***/ function(module, exports) {
/* (ignored) */
/***/ }
});
I have no idea, what that means.
The version 1.4.x has this problem, version 1.3.x works ok.
Note: we are using pdfjs-dist npm package.
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
How to create an entirely self-contained chunk using Webpack 3
Using Webpack 3 to build my project, my initial approach was to create a separate entry for the service worker and put the...
Read more >Code Splitting - webpack
The dependOn option allows to share the modules between the chunks: ... As you can see there's another runtime.bundle.js file generated besides ...
Read more >Under The Hood - webpack
The bundling is a function that takes some files and emits others. ... When you describe an entry point - under the hood,...
Read more >worker-loader - webpack - JS.ORG
chunkFilename, The filename of non-entry chunks for web workers ... Inline mode with the fallback value will create file for browsers without support...
Read more >CommonsChunkPlugin - webpack
The CommonsChunkPlugin is an opt-in feature that creates a separate file (known as a ... When using `options.async` to create common chunks from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The worker is not bundled automatically after #7189. Please add workerSrc setting and bundling procedure for pdf.worker.entry.js. See https://github.com/mozilla/pdf.js/blob/master/examples/webpack/main.js#L11 and https://github.com/mozilla/pdf.js/blob/master/examples/webpack/webpack.config.js#L8 .
Yeah, I got it working. Thanks.