diff --git a/CHANGELOG.md b/CHANGELOG.md index aa45f45..c7a1bbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog * Reject in promise instead of throwing MISSING_DEST_DIR +* In file transformers, use the destination filename extension to decide the sourcemap comment style. ([#116](https://github.com/gobblejs/gobble/issues/116)) ## 0.11.3 diff --git a/src/builtins/map.js b/src/builtins/map.js index 705867d..578f0b6 100644 --- a/src/builtins/map.js +++ b/src/builtins/map.js @@ -109,7 +109,7 @@ function processResult ( result, original, src, dest, codepath ) { // if a sourcemap was returned, use it if ( result.map ) { return { - code: result.code.replace( SOURCEMAP_COMMENT, '' ) + getSourcemapComment( encodeURI( codepath + '.map' ), extname( codepath ) ), + code: result.code.replace( SOURCEMAP_COMMENT, '' ) + getSourcemapComment( encodeURI( codepath + '.map' ), extname( dest ) ), map: processSourcemap( result.map, src, dest, original ) }; }