gulp-babel icon indicating copy to clipboard operation
gulp-babel copied to clipboard

generated source maps are broken

Open Wonko7 opened this issue 6 years ago • 5 comments

Hi all,

I can't seem to generate valid sourcemaps when using gulp-babel, please let me know if I'm missing something or got something wrong, but I think this is a bug.

You can reproduce this behaviour here: https://github.com/Wonko7/gulp-babel-bug-report

Using gulp-babel 8.0.0-beta.2 to build a project produces incorrect sourcemaps, whereas calling babel manually on each js file works.

If you need anything else let me know.

Wonko7 avatar Jul 04 '18 08:07 Wonko7

It may be related to a sourcemaps issue with subdirectories.

Can you try this workaround?

demurgos avatar Jul 05 '18 07:07 demurgos

Thanks @demurgos but it didn't work, I tried your fix here: https://github.com/Wonko7/gulp-babel-bug-report/blob/sourceRoot/gulpfile.babel.js Let me know if I did it wrong.

Wonko7 avatar Jul 05 '18 08:07 Wonko7

You applied it properly, so it seems it is not related to the issue I linked.

I am not on my dev computer right now so I can't run your repro (BTW, thanks: it's great to have it). I'll try to look at it later. If you find something yourself, please leave a comment.

demurgos avatar Jul 05 '18 09:07 demurgos

Seems to be a duplicate of #64

demurgos avatar Jul 18 '18 12:07 demurgos

I have this problem aswell (using only gulp-babel along with gulp-sourcemaps), and the generated sourcemaps open properly in the browser, however they are desynced with original code. I'm using @babel/plugin-transform-async-to-generator for async/await support.

Herz3h avatar Oct 09 '19 09:10 Herz3h