You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yea, it's not super nice. But it's important to have it match the compiled code because if the error is really weird, you'll want to switch to "view compiled" and see if it's Babel messing things up or not. In this case it's very valuable to have the error correspond exactly to the code that runs in the browser.
I think the right solution here is to lobby Webpack to change that prefix to something shorter 😄 .
Ah. It's probably not intentional though? They're excluded because transform couldn't handle them, but not because they're necessarily expensive (I don't know, just a guess). If that's true maybe we can contribute to pass them through.
Activity
gaearon commentedon May 19, 2017
Yea, it's not super nice. But it's important to have it match the compiled code because if the error is really weird, you'll want to switch to "view compiled" and see if it's Babel messing things up or not. In this case it's very valuable to have the error correspond exactly to the code that runs in the browser.
I think the right solution here is to lobby Webpack to change that prefix to something shorter 😄 .
RohovDmytro commentedon May 19, 2017
@gaearon can we apply sourcemaps to make error more readable? We can show it's real content only if user is clicking on «View compiled»
It's not super important. It's just that this overlay is super nice feature 😈
gaearon commentedon May 19, 2017
I'm not sure if there's a way to map variables back, but let me know if you find it :-)
Timer commentedon May 19, 2017
I'm pretty sure the variable maps are explicitly excluded/stripped by webpack's cheap maps.
See webpack/source-list-map#2
gaearon commentedon May 19, 2017
Ah. It's probably not intentional though? They're excluded because transform couldn't handle them, but not because they're necessarily expensive (I don't know, just a guess). If that's true maybe we can contribute to pass them through.
gaearon commentedon Jan 8, 2018
I feel like we should preserve the original text for more complex scenarios. Obfuscating it could actually make debugging more confusing.
I suggest you to file this with webpack and ask them to use a shorter obscure sequence. For example
__webpack_import_0__lodash_default
.gaearon commentedon Jan 8, 2018
OK, I filed webpack/webpack#6266