Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Commit 6be8e64

Browse files
committed
ensure css loads cache is properly cleared
1 parent 67d7f0e commit 6be8e64

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

css-plugin-base-builder.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ exports.bundle = function(loads, compileOpts, outputOpts) {
6464
sourceMap: load.metadata.styleSourceMap
6565
};
6666
});
67+
cssLoads = [];
6768

6869
return new Promise(function(resolve, reject) {
6970
new CleanCSS({
@@ -93,8 +94,9 @@ exports.bundle = function(loads, compileOpts, outputOpts) {
9394
fs.writeFileSync(outFile, cssOutput);
9495
}
9596
else {
96-
// NB do data-encoding of css source map for non separateCSS case?
97-
// cssOutput += '/*# sourceMappingURL=data,''
97+
if (outputOpts.sourceMaps) {
98+
cssOutput += '/*# sourceMappingURL=data:application/json;base64,' + new Buffer(result.map.toString()).toString('base64') + '*/';
99+
}
98100
return cssInject + '\n("' + escape(cssOutput) + '");';
99101
}
100102
});

0 commit comments

Comments
 (0)