rules_sass icon indicating copy to clipboard operation
rules_sass copied to clipboard

Warning about source-maps

Open alexeagle opened this issue 5 years ago • 3 comments

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:

  1. include that sourcemap in the repo and include source-map-support in the build_bazel_rules_sass_compiletime_deps repo so that crashes of the sass tool will report Dart line numbers (probably useful for project maintainers
  2. Update to newer rules_nodejs and set install_source_map_support = False in @io_bazel_rules_sass//sass:sass_bin to suppress the warning

alexeagle avatar Aug 14 '18 05:08 alexeagle

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.

nex3 avatar Aug 14 '18 19:08 nex3

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)

alexeagle avatar Aug 15 '18 18:08 alexeagle

Ah, okay. I'll do option 2 as well.

nex3 avatar Aug 15 '18 18:08 nex3