Open shellscape opened 6 years ago
So here is how bundlephobia works. We emulate creation of a new project by the end user, and to the project's entry point, we import the requested package as a import pack from <requested-package>
Then, to make sure that tree shaking doesn't come into play, we "use" the imported package.
Next the project is built out using webpack, with the generated entry point, just like a user would. Now while webpack resolves packages using its resolution mechanism, it can encounter packages that it cannot find. Hence this error.
I've been trying to write a webpack resolve plugin that ignores such "missing" dependencies and moves the build forward with appropriate warning anyway, though abandoned it midway due to lack of documentation around it. Would love to accept a PR arround this.
@pastelsky looks like your comment was cut off.
Yeah, hard to get it right the first time when you're typing on mobile in a metro train, using Github's dektop UI.
Type
Bug
Package name
webpack-dev-server
Entire error (stringified) I see in my browser console
I took it a bit further, since the API is throwing a 504. https://bundlephobia.com/api/size?package=webpack-dev-server&record=true returns the following raw output:
While some of the code does indeed "require"
webpack/hot
, it's only in files bundled and served to the client. So it may be that bundlephobia is being overly aggressive in this case.