Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: provide useful stacktrace on chunk loading failure
Error created from load/error event handler has no useful stack trace whatsoever as it's an async event and stack has unwound already at that point. To have better (sync) stacktrace of what triggered loading of the chunk, create error before stack has unwound and use it and its stacktrace later, in case of an error. This potentially has some processing overhead as browser needs to create a stacktrace. It's probably not that big though but I haven't done any real testing.
- Loading branch information