Skip to content

Commit 52e1df9

Browse files
devversionmmalerba
authored andcommitted
build: switch to extract_js_module_output rule from dev-infra
Replaces our custom ES5 JS module extraction rule with a configurable one that has recently been added to the dev-infra package.
1 parent 73f8bc0 commit 52e1df9

File tree

2 files changed

+9
-35
lines changed

2 files changed

+9
-35
lines changed

src/dev-app/BUILD.bazel

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
load("@npm//@angular/dev-infra-private/bazel:extract_js_module_output.bzl", "extract_js_module_output")
12
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web")
23
load("//tools:create-system-config.bzl", "create_system_config")
34
load("//tools:defaults.bzl", "ng_module", "sass_binary")
4-
load("//tools:es5-module-output.bzl", "es5_module_output")
55
load("//tools/dev-server:index.bzl", "dev_server")
66

77
package(default_visibility = ["//visibility:public"])
@@ -200,8 +200,15 @@ dev_server(
200200

201201
# Collects all ES5 JavaScript files which are required to serve the dev-app. By default,
202202
# ts_library and ng_module targets only expose the type definition files as outputs.
203-
es5_module_output(
203+
extract_js_module_output(
204204
name = "dev_app_js_sources",
205+
include_declarations = False,
206+
include_default_files = True,
207+
# `JSModuleInfo` resolves to the ES5 sources from TypeScript targets. See:
208+
# https://github.com/bazelbuild/rules_nodejs/blob/stable/packages/typescript/internal/build_defs.bzl#L334-L337
209+
# Note: We cannot use the named JS module provider because not all dependencies are
210+
# necessarily captured as named module. See: https://github.com/angular/components/commit/94289397cac94ca86a292b2cd64945df52bbb7fb.
211+
provider = "JSModuleInfo",
205212
tags = ["manual"],
206213
deps = [":dev-app"],
207214
)

tools/es5-module-output.bzl

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)