mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
e818a009a1
Prevents esbuild generated metadata files from being included in build artifacts. This reduces package size and avoids shipping unnecessary internal build data. PR Close #61636
36 lines
690 B
Python
36 lines
690 B
Python
load("@npm//@bazel/esbuild:index.bzl", "esbuild", "esbuild_config")
|
|
load("//tools:defaults2.bzl", "ts_project")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
ts_project(
|
|
name = "cli",
|
|
srcs = glob(
|
|
["**/*.ts"],
|
|
),
|
|
deps = [
|
|
"//packages/service-worker/config:config_rjs",
|
|
],
|
|
)
|
|
|
|
esbuild_config(
|
|
name = "esbuild_config",
|
|
config_file = "esbuild.config.js",
|
|
)
|
|
|
|
esbuild(
|
|
name = "ngsw_config",
|
|
config = ":esbuild_config",
|
|
entry_point = ":main.ts",
|
|
external = [
|
|
"@angular/service-worker",
|
|
],
|
|
format = "esm",
|
|
metafile = False,
|
|
platform = "node",
|
|
target = "node12",
|
|
deps = [
|
|
":cli",
|
|
],
|
|
)
|