Skip to content

Commit 4d52298

Browse files
committed
Fix sourcemap comments to be used on file transformers with CSS output
1 parent f459539 commit 4d52298

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.11.4
4+
5+
* In file transformers, use the destination filename extension to decide the sourcemap comment style. ([#116](https://github.com/gobblejs/gobble/issues/116))
6+
37
## 0.11.3
48

59
* Allow `.ext` option to work if `.accept` is a regex ([#97](https://github.com/gobblejs/gobble/issues/97))

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gobble",
33
"description": "The last build tool you'll ever need",
4-
"version": "0.11.3",
4+
"version": "0.11.4",
55
"author": "Rich Harris",
66
"license": "MIT",
77
"repository": "https://github.com/gobblejs/gobble",

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)