Closed sindresorhus closed 10 years ago
:+1: please, fix :)
waiting for fix
+1
+1
+1
vinyl-sourcemaps-apply
does not loose the property. gulp-ng-annotate
is passing a source map without the file
property, so when applying this source map the result is one without the file
property. The next plugin in the chain will crash because the file property is absolutely needed for the upstream source map (which is what happened to gulp-uglify
, even though it was not the responsible plugin).
I published a new version that includes checks for the file
property (+ mappings
and sources
) and throws an Error in case they are missing. This way the error is thrown in the right plugin and even if there is no plugin following it.
The error still needs to be fixed in the plugins. vinyl-sourcemaps-apply
cannot do this, because it doesn't know the plugins output file name. I sent a pull request fixing it on gulp-ng-annotate
.
See: https://github.com/Kagami/gulp-ng-annotate/commit/2dd427d54a2e14d473563fee89ed2e223cb19f40#diff-168726dbe96b3ce427e7fedce31bb0bcR16 and https://github.com/terinjokes/gulp-uglify/issues/53 and https://github.com/sindresorhus/gulp-autoprefixer/issues/2