rules_sass
rules_sass copied to clipboard
Warning about source-maps
A build at latest version reports
WARNING: source-map-support module not installed.
Stack traces from languages like TypeScript will point to generated .js files.
The sass.dart.js
file in the npm:sass distro ends with
//# sourceMappingURL=sass.dart.js.map
but no such file is in the distro.
We should either:
- include that sourcemap in the repo and include
source-map-support
in thebuild_bazel_rules_sass_compiletime_deps
repo so that crashes of the sass tool will report Dart line numbers (probably useful for project maintainers - Update to newer rules_nodejs and set
install_source_map_support = False
in@io_bazel_rules_sass//sass:sass_bin
to suppress the warning
There's a third option: remove the comment from the generated source file in the first place. Since the npm package doesn't (currently) ship with the source map, this probably makes sense independent of Bazel support.
Even if you remove the source mapping line, you still need to do option 2 because we don't read the file to determine whether to enable source mapping. (I suppose we could, but we'd have to read all .js files that might be loaded during the program execution, which is all the action inputs in theory)
Ah, okay. I'll do option 2 as well.