Skip to content

Commit 0dc5fd9

Browse files
committed
removing sourcemap if not needed
1 parent 5bf1893 commit 0dc5fd9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/processCss.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,20 @@ module.exports = function processCss(inputSource, inputMap, options) {
167167
}));
168168
}
169169

170-
var result = pipeline.process(inputSource, {
170+
var opts = {
171171
from: options.from,
172-
to: options.to,
173-
map: {
172+
to: options.to
173+
}
174+
if ( query.sourcemap ) {
175+
opts.map = {
174176
prev: inputMap,
175177
sourcesContent: true,
176178
inline: false,
177179
annotation: false
178180
}
179-
});
180181

182+
}
183+
var result = pipeline.process(inputSource, opts);
181184

182185
return {
183186
source: result.css,

0 commit comments

Comments
 (0)