-
Notifications
You must be signed in to change notification settings - Fork 117
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
init({ loadMaps: true }) does not remove sourcemaps added earlier in the same pipeline #218
Comments
@kjots is this a problem against master as well? |
Hi @nmccready, can confirm this issue is still present in gulp-sourcemaps version 2.1.1. |
I actually think this issue is a dupe, if not another issue is the dupe |
Hitting this problem: browserify('src/bootstrap.js', {debug: true})
.bundle()
.pipe(source('src/bundle.js'))
.pipe(buffer())
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(sourcemaps.write('.', {sourceRoot: fileUri(__dirname)})
.pipe(gulp.dest('dist')) the |
I have the same problem: rollup(merge(ROLLUP_CONFIG, {entry: './src/index.js'}))
.pipe(source('index.js', './src/*'))
.pipe(buffer())
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(sourcemaps.write('./map'))
.pipe(gulp.dest('.')); This ended with a Another task includes an uglify step and it output the
The essential difference is the |
A quick git-bisect leads to 6972337 |
Yeah, I will need add another spec to cover this case and figure out how to work around or remove preExisting. |
Please consider this a high priority, it made debugging our clients impossible. Maybe even revert whatever introduced this for the time being? |
Use the previous release 2.2.0 or 1.9.0 |
In my case downgrading to 2.2.0 resolved this issue! |
Downgrading to 2.2 did not fix it for me (with the Gulptask I posted above) |
If a sourcemap is written, and then subsequently loaded and written again in the same pipeline, then the final output contains both sourcemaps.
For example, given the following input file (
test.es6.js
):When running the following Gulp script:
Then the following output is produced (
test.es5.js
):If the pipeline is separated into two stages, with the file being output via
gulp.dest()
after the first sourcemap is written and then a new pipeline is created viagulp.src()
, then the first sourcemap is removed as expected:The text was updated successfully, but these errors were encountered: