Skip to main content
Version: 1.17.x

js_filegroup

Helper rule to gather files from JsInfo providers of targets and provide them as default outputs

Rules

js_filegroup

Gathers files from the JsInfo providers from targets in srcs and provides them as default outputs.

This helper rule is used by the js_run_binary macro.

Example usage (generated):

load("@aspect_rules_js//js:defs.bzl", "js_filegroup")

js_filegroup(
# A unique name for this target.
name = "",
)

name

Required name.

A unique name for this target.

include_declarations

Optional boolean. Default: False

When True, declarations and transitive_declarations from JsInfo providers in srcs targets are included in the default outputs of the target.

Defaults to false since declarations are generally not needed at runtime and introducing them could slow down developer round trip time due to having to generate typings on source file changes.

include_npm_linked_packages

Optional boolean. Default: True

When True, files in npm_linked_packages and transitive_npm_linked_packages from JsInfo providers in srcs targets are included in the default outputs of the target.

transitive_files from NpmPackageStoreInfo providers in data targets are also included in the default outputs of the target.

include_transitive_sources

Optional boolean. Default: True

When True, transitive_sources from JsInfo providers in srcs targets are included in the default outputs of the target.

srcs

Optional list of labels. Default: []

List of targets to gather files from.