Generate source maps for the npm package
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 802
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 5
Description
At the moment, debugging the library when something doesn't work as expected it's really hard because the library doesn't provide any source map. It would be great if the npm package could include the source maps alongside the uglified js code.
I've tried to change the [build instruction](https://github.com/grpc/grpc-web/blob/master/packages/grpc-web/scripts/build.js#L32) myself adding the following flags:
```
const closureArgs = [].concat(
jsPaths.map(jsPath => `--js=${jsPath}`),
[
`--entry_point=grpc.web.Exports`,
`--externs=externs.js`,
`--dependency_mode=STRICT`,
`--compilation_level= ADVANCED_OPTIMIZATIONS`,
`--generate_exports`,
`--export_local_property_definitions`,
`--js_output_file=${indexPath}`,
`--create_source_map=${indexPath}.map`,
`--output_wrapper="%output%
//# sourceMappingURL=${indexPath}.map"`
]
);
```
However, when I build and run my client app with webpack, I still can't debug the original code even though I see the `sourceMappingURL` comment in the compiled code.
I'm a complete newbie to closure-compiler, so probably I'm doing something wrong.
Contributor guide
Assessment
This issue has not been assessed yet.