Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Re-export the "module_name" attribute of ts_library as a provider.
Browse files Browse the repository at this point in the history
This lets downstream rules like Angular see the module_name and use it for packaging.

Note that we also have a module_mapping aspect which collects up a mapping usable for TypeScript pathMapping, but this doesn't indicate which key belongs to this target vs. its dependencies.

PiperOrigin-RevId: 192685304
  • Loading branch information
alexeagle committed Apr 12, 2018
1 parent 9b87947 commit a8479b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/common/compilation.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ def compile_ts(ctx,
},
# Expose the tags so that a Skylark aspect can access them.
"tags": ctx.attr.tags,
# Expose the module_name so that packaging rules can access it.
# e.g. rollup_bundle under Bazel needs to convert this into a UMD global
# name in the Rollup configuration.
"module_name": ctx.attr.module_name,
"instrumented_files": {
"extensions": ["ts"],
"source_attributes": ["srcs"],
Expand Down

0 comments on commit a8479b3

Please sign in to comment.