mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Define the tsconfig for service worker instead of manually including the tsconfig on each target PR Close #61341
34 lines
668 B
Text
34 lines
668 B
Text
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",
|
|
platform = "node",
|
|
target = "node12",
|
|
deps = [
|
|
":cli",
|
|
],
|
|
)
|