-
-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Babel-loader looses correct error stack when Promise and react-router is used #114
Comments
zloirock/core-js#107. Unhandled rejection tracking is not a part of spec. Stack - also. If you wanna help implement long stack trace - welcome. |
@zloirock thanks for the reply! this doesn't only happen with core-js Promise, I tried |
You tried |
@zloirock I tried previously with less "reduced" setup (more of my app code was in the example). Retried again and now I can see that actually import Promise from 'bluebird';
Promise.longStackTraces();
require('babel-runtime/core-js/promise').default = Promise; I put that above other requires and I could definitely see that bluebird was picked up. The trace it prints is different as it’s using |
I found that in my case just using |
Actually, it's a part of the spec - tc39/ecma262#76 |
@benjamingr I mean ES6 :) Anyway, unhandled rejection tracking available. |
When initial rendering kicks off in a Promise callback the error stack and location are lost. The stack and location are correct when using transform-loader?babelify with exact same code.
Here's babel-loader:
Here
babelify
via webpack’stransform-loader
yields correct code location:I've tried to compile the minimal code to reproduce, removing routing from the code solves the problem, but with
babelify
it works without removing routing: https://github.com/gryzzly/babel-loader-issueThe text was updated successfully, but these errors were encountered: