bazelbuild / bazelbuild/rules_closure

When tests are compiled, sourceMappingUrl is not added to the resulting _bin.js file

Open
#193 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
159
Forks
111
PR merge metrics
No merged PRs in 30d

Description

When I invoke closure_js_test like so:

```python
closure_js_test(
name = "sometest",
entry_points = ...,
srcs = ...,
deps = ...,
language = "ECMASCRIPT6_STRICT",
defs = [
"--jscomp_error=*",
"--jscomp_off=analyzerChecks",
"--dependency_mode=LOOSE"
],
)
```

the resulting _bin.js file doesn't contain

```javascript
//# sourceMappingURL=sometest_bin.js.map
```

which would allow browsers to use the source map.

Contributor guide

Open the contributing guide

Research direction

Start at the closure_js_test rule implementation and trace how the resulting _bin.js file and its source map are produced. Reproduce the issue with the shown rule configuration, then verify that the generated file includes the sourceMappingURL comment pointing to sometest_bin.js.map.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.