Skip to content

Commit

Permalink
Clarification on how rollup_bundle works with ts_library inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
sly010 authored and alexeagle committed Dec 17, 2019
1 parent 88694a4 commit 0ee5e7c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/rollup/src/rollup_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,27 @@ rollup_bundle(
}
)
```
If `rollup_bundle` is used on a `ts_library`, the `rollup_bundle` rule handles selecting the correct outputs from `ts_library`.
In this case, `entry_point` can be specified as the `.ts` file and `rollup_bundle` will handle the mapping to the `.mjs` output file.
For example:
```python
ts_library(
name = "foo",
srcs = [
"foo.ts",
"index.ts",
],
)
rollup_bundle(
name = "bundle",
deps = [ "foo" ],
entry_point = "index.ts",
)
```
""",
allow_single_file = True,
),
Expand Down

0 comments on commit 0ee5e7c

Please sign in to comment.