Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

Commit 39f6aab

Browse files
Invalidate cache when any option is changed
This was suggested in the original no-container pull request, but I didn't understand the reason for it. After experimentation I now see that Sass doesn't break its cache when options that affect file contents are changed. Bummer. Just to be safe let's break cache when any option is changed -- if people complain we can remove some that certainly don't affect output files like our own `verbose`.
1 parent 4645821 commit 39f6aab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ exports.emitErr = function (stream, err) {
1010
};
1111

1212
// Create unique temporary directory path per task using cwd, options, sources,
13-
// and all matched files. Sourcemap option switching does not break Sass cache
14-
// so we do it ourselves. Possibly a bug: https://github.com/sass/sass/issues/1830
13+
// and all matched files. Switching options does not break Sass cache so we do
14+
// it ourselves. Possibly a bug: https://github.com/sass/sass/issues/1830
1515
exports.createIntermediatePath = function (sources, matches, options) {
1616
return path.join(
1717
options.tempDir,
@@ -20,7 +20,7 @@ exports.createIntermediatePath = function (sources, matches, options) {
2020
process.cwd() +
2121
JSON.stringify(sources) +
2222
JSON.stringify(matches) +
23-
options.sourcemap
23+
JSON.stringify(options)
2424
)
2525
);
2626
};

0 commit comments

Comments
 (0)