-
Notifications
You must be signed in to change notification settings - Fork 36
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
Better Source Map Support #6
Comments
I will try source-map package from mozilla, but I don't know where I can find the source map of the failed modules |
@capaj you could add a custom post-translate hook to the loader that reads |
@guybedford how would I do that? I could have my own loading plugin, but it wouldn't be convenient to force everyone to write Is there a way to add a translate hook for all js files without actually writing a regular |
@capaj, yes you can always hook the loader directly - var systemTranslate = System.translate;
System.translate = function(load) {
return systemTranslate.call(this, load)
.then(function(translated) {
sourceMapCache[load.name] = load.metadata.sourceMap;
return translated;
});
}; |
@guybedford that looks trivial, I didn't think it would be this easy. Will try that ASAP. edit: it isn't as trivial-
to my babelOptions, but that didn't help. |
@guybedford I've tried inspecting |
@capaj |
@guybedford thats not what I have been seeing. I have been trying it with https://github.com/capaj/jspm-react and in there, I have at least six files which transpile with babel and their Let me show you on a special branch. Just a moment.... |
@capaj yes you are correct. This will only happen in the 0.17 version when we use https://github.com/systemjs/plugin-babel. Apologies for sending you down a wrong path here for now. |
@guybedford so you're working on a babel plugin for systemjs? That would be allright. I can try it with that plugin. Never the less it is a shame we can't get the sourcemaps even for built in transpilers. I hope you don't mind me opening a bug in systemjs for this. Back to babel plugin: Thanks for clarification. |
The built in transpilers are being deprecated for 0.17. Loaders are set via config - see https://github.com/systemjs/systemjs/blob/master/docs/overview.md#plugin-loaders. |
no need for that systemjs bug then. Awesome. I will try the babel-plugin, don't let me distract you from building that 0.17 version. Thanks a lot |
stack trace we get in the browser points to transpiled code, what we need is to get a stack for the real source code. This will be super useful for creating an editor plugin which would be able to navigate to the exact spot, where the error occurred.
Any idea how we could do that @guybedford ?
The text was updated successfully, but these errors were encountered: