Do you want to request a feature or report a bug?
What is the current behavior?
throw statement into a bundle when a module is missing
If the current behavior is a bug, please provide the steps to reproduce.
- Clone this repository
dist/bundle.jsand grep for
Cannot find module
What is the expected behavior?
My expectation is that
webpack would throw at build time, instead of inlining code to throw at runtime, when a module cannot be found. This would be an easy to miss bug if the
throw statement is in a chunk that doesn’t happen to be covered by E2E or manual testing.
If this is a feature request, what is motivation or use case for changing the behavior?
Would make it easier to catch cases where a module can’t be found
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
This happens in the latest webpack stable at the time of writing (
I’m trying to figure out if there was a specific reason that this behavior needed to happen at run-time, or if this was just overlooked.