aspect-build / rules_swc

Bazel rules for the swc toolchain https://swc.rs/
https://docs.aspect.build/rules/aspect_rules_swc
Apache License 2.0
44 stars 24 forks source link

feat: add a new source_root attribute #177

Closed realtimetodie closed 1 year ago

realtimetodie commented 1 year ago

Allows the user to specify a custom location where a debugger should locate source files.

This imitates the TSConfig sourceRoot configuration option

https://www.typescriptlang.org/tsconfig#sourceRoot

Example

swc(
    name = "compile",
    source_maps = True,
    source_root = "https://my-website.com/debug/source/",
)

The source_root attribute is optional.

Related

realtimetodie commented 1 year ago

The documentation was partially updated. The wording follows the TypeScript cli guide

https://www.typescriptlang.org/docs/handbook/compiler-options.html

thesayyn commented 1 year ago

Thanks, @realtimetodie. @jbedard is working on fixing this which will include your changes.