Throw the original error instead of loadChunkError:true
ghusse opened this issue · comments
I have trouble debugging my app when there is an issue in a lazy loaded route, because this loader is throwing { loadChunkError:true }
instead of the original error.
Is it possible to simply rethrow the original error?
I'd like something like that:
{
path: 'lazy',
loadChildren: () => new Promise(function (resolve, reject) {
(require as any).ensure([], function (require: any) {
resolve(require('./lazy/lazy.module')['LazyModule']);
}, reject);
})
}
The docs are out of date. The latest released version throws { loadChunkError: true, details: "original error" }
Ok, thanks. I'll update my version.