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

Fix sourcemap's bug for files in nested folders. Closes #54 #61

Merged
merged 1 commit into from
Nov 27, 2015

Conversation

pofigizm
Copy link
Contributor

Before fix:

screen shot 2015-11-22 at 14 06 05

## After fix:

screen shot 2015-11-22 at 15 29 45

## Simple gulp task to reproduce it:
const gulp        = require('gulp');
const babel       = require('gulp-babel');
const sourcemaps  = require('gulp-sourcemaps');

gulp.task('default', () => {
  return gulp.src('src/**/*.js')
    .pipe( sourcemaps.init() )
    .pipe( babel({ presets: ['es2015'] }) )
    .pipe( sourcemaps.write() )
    .pipe( gulp.dest('dest') )
  ;
});

Folders structure of this example:

src
├── nested
│   ├── nested
│   │   └── source3.js
│   └── source2.js
└── source1.js

I already pushed fix for this problem to babel-core, but now I understood how we could fix it here.

closes #54

sindresorhus added a commit that referenced this pull request Nov 27, 2015
Fix sourcemap's bug for files in nested folders. Closes #54
@sindresorhus sindresorhus merged commit 336d6ac into babel:master Nov 27, 2015
@sindresorhus
Copy link
Member

Thanks for taking the time to do a good pull request :)

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

Successfully merging this pull request may close these issues.

Source-maps source path is wrong
2 participants