Skip to content

Commit afaa94f

Browse files
committed
Merge pull request #116 from gobblejs/css-sourcemap-comments
Fix sourcemap comments to be used on file transformers with CSS output
2 parents 6d5b4fa + 0234bfd commit afaa94f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
* Reject in promise instead of throwing MISSING_DEST_DIR
4+
* In file transformers, use the destination filename extension to decide the sourcemap comment style. ([#116](https://github.com/gobblejs/gobble/issues/116))
45

56
## 0.11.3
67

src/builtins/map.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function processResult ( result, original, src, dest, codepath ) {
109109
// if a sourcemap was returned, use it
110110
if ( result.map ) {
111111
return {
112-
code: result.code.replace( SOURCEMAP_COMMENT, '' ) + getSourcemapComment( encodeURI( codepath + '.map' ), extname( codepath ) ),
112+
code: result.code.replace( SOURCEMAP_COMMENT, '' ) + getSourcemapComment( encodeURI( codepath + '.map' ), extname( dest ) ),
113113
map: processSourcemap( result.map, src, dest, original )
114114
};
115115
}

0 commit comments

Comments
 (0)