Consider moving Webpack support to a separate package
See original GitHub issueI propose moving webpack.js to a separate package. Why?
If someone is instaling pdf.js, while NOT using Webpack, they will see the following warnings:
warning "yourpackage > pdfjs-dist@2.0.305" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0".
warning "yourpackage > pdfjs-dist > worker-loader@1.1.1" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning "yourpackage > pdfjs-dist > worker-loader > schema-utils@0.4.5" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
By doing so, we could get rid of worker-loader
and webpack
dependencies, making required download/build time/test time significantly smaller.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:39
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Code Splitting - webpack
Let's take a look at how we might split another module from the main bundle: project webpack-demo |- package.json |- package-lock.json |- webpack.config.js ......
Read more >The CLI moved into a separate package: webpack-cli. What is ...
I was having the same problem after update some dependencies. Check the webpack-dev-server version, I had 3.1.3 and I was getting same error ......
Read more >Webpack CLI has moved into a separate package. - Treehouse
When I attempt to minify my bundle with either a custom build script or node_modules/.bin/webpack: The execution fails, telling me that the CLI ......
Read more >Migrating to webpack 5 to improve build time and reduce ...
Webpack migration from v4 to v5 is not just upgrading the webpack version, it's about migrating all the plugins and loaders to their...
Read more >Getting Started With Webpack - Smashing Magazine
Modules are broken-down parts of your application which you import to perform a specific task or function. Webpack supports modules created ...
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
Do you really want
worker-loader
in dependencies?, maybe it should be indevDependencies
, that’s why you get another warning if you removewebpack
from peers: https://github.com/webpack-contrib/worker-loader/blob/master/package.json#L42I see it is used here: https://github.com/mozilla/pdfjs-dist/blob/master/webpack.js#L18
This is the first time I see webpack published in distribution, for something should be working in the client side, as webpack as I know working for building the distribution not part of it.
I believe the correct solution is outlined here: https://github.com/mozilla/pdf.js/issues/9733.
webpack
should not be a"peerDependency"
at all.