Sourcemap chain is broken with plugins prior to babel only for files in folders #2964
Labels
area: sourcemaps
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
When going from TypeScript -> (gulp-typescript) -> ES6 -> (gulp-babel ES2015) -> ES5, sourcemaps are incorrect only for files inside folders. This is using gulp-sourcemaps. I would have thought it has more to do with one of the gulp components, but despite all the parties involved I think I have narrowed it down to occurring inside babel.transform by watching correct values go in (the call made here in gulp-babel). I also dropped in an uglify step at the end just to see if it was related to gulp-sourcemaps, but uglify was able to succesfully get back two stages. I did vary path settings such as gulp.src base and sourcemap write paths, in case I was missing something with configuration, but all cases i tried seemed to reproduce the same issue.
Also, a gist for simple reproduction with tsconfig and such: https://gist.github.com/EricABC/5944557c5b54ddba7616
The _ in file names is the path (but basically just put any TS file in a root 'src' folder, and another in 'src/nested').
You will see the 'src/file.js.map' can map to the ts file, but 'src/nested/nestedfile.js.map' goes the the interim ES6 javascript.
Also of interest, Here in gulp-typescript is a line of code with comments that specifically addresses an issue where further plugins not in the root could be affected.
The text was updated successfully, but these errors were encountered: