Skip to content
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 sourcemap source resolution #69

Open
Rich-Harris opened this issue May 7, 2015 · 0 comments · May be fixed by #75
Open

Better sourcemap source resolution #69

Rich-Harris opened this issue May 7, 2015 · 0 comments · May be fixed by #75

Comments

@Rich-Harris
Copy link
Contributor

A sourcemap source is the first file that doesn't have an associated sourcemap, but that means that if you have a build like this...

module.exports = gobble( 'src' )
  .grab( 'js' )
  .exclude( 'whatever.js' )
  .transform( 'babel' );

...then as far as babel is concerned, the source files are .gobble/02-exclude/[files].js. So that's what shows up in the sources pane in-browser.

Since gobble now owns the sourcemap pipeline, it'd be nice to fix those so that the correct sources are revealed, at least on a best effort basis. On OS X it would be easy enough to just trace the symlinks back to their origin (since in the majority of cases, they will be symlinks to files in an original source dir), but that doesn't work on Windows where symlinks can't be used. So it might take a slightly more sophisticated approach. Perhaps if we store checksums of all the source files, then we can read any sources in the final sourcemaps that live inside .gobble, find their checksums, and match them up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant