File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ http_archive(
1515# Add sass rules
1616http_archive (
1717 name = "io_bazel_rules_sass" ,
18+ # Patch `rules_sass` to work around a bug that causes error messages to be not
19+ # printed in worker mode: https://github.com/bazelbuild/rules_sass/issues/96.
20+ # TODO(devversion): remove this patch once the Sass Node entry-point returns a `Promise`.
21+ patches = ["//tools/bazel:sass_worker_async.patch" ],
1822 sha256 = "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647" ,
1923 strip_prefix = "rules_sass-1.25.0" ,
2024 urls = [
Original file line number Diff line number Diff line change 1+ diff --git sass/sass_wrapper.js sass/sass_wrapper.js
2+ index 21abb8f..168ee49 100644
3+ --- sass/sass_wrapper.js
4+ +++ sass/sass_wrapper.js
5+ @@ -17,7 +17,9 @@ const fs = require('fs');
6+ const args = process.argv.slice(2);
7+ if (runAsWorker(args)) {
8+ debug('Starting Sass compiler persistent worker...');
9+ - runWorkerLoop(args => sass.run_(args));
10+ + runWorkerLoop(args => {
11+ + return new Promise((resolve, reject) => sass.run_(args)['then$1$2$onError'](resolve, reject));
12+ + });
13+ // Note: intentionally don't process.exit() here, because runWorkerLoop
14+ // is waiting for async callbacks from node.
15+ } else {
You can’t perform that action at this time.
0 commit comments