mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit fixes the linking of CDK/Material which recently broke because the CDK/Material package now comes with potential shared FESM chunks; that our current hard-coded, manual linking process doesn't know about. This ultimately resulted in duplicate code, breaking Material/CDK. This commit fixes that. In addition to the fix, we simplify our linking significantly and reduce the rather large complexity around linking, or having to specify every entry-point manually, by linking the full package and putting it into a different location. This is also what we conceptually are doing in Angular Material as part of the `rules_js` migration. PR Close #60516
47 lines
1 KiB
Text
47 lines
1 KiB
Text
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
|
load("//tools:defaults.bzl", "esbuild_config")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
js_library(
|
|
name = "esbuild_base",
|
|
srcs = ["esbuild-base.config.mjs"],
|
|
deps = [
|
|
"//packages/compiler-cli/private",
|
|
"@npm//@angular/build-tooling/shared-scripts/angular-optimization:js_lib",
|
|
],
|
|
)
|
|
|
|
esbuild_config(
|
|
name = "esbuild_config_esm",
|
|
config_file = "esbuild-esm.config.mjs",
|
|
deps = [
|
|
":esbuild_base",
|
|
"@npm//@angular/build-tooling/shared-scripts/angular-optimization:js_lib",
|
|
],
|
|
)
|
|
|
|
esbuild_config(
|
|
name = "esbuild_config_esm_prod",
|
|
config_file = "esbuild-esm-prod.config.mjs",
|
|
deps = [
|
|
":esbuild_base",
|
|
],
|
|
)
|
|
|
|
esbuild_config(
|
|
name = "esbuild_config_iife",
|
|
config_file = "esbuild-iife.config.mjs",
|
|
deps = [
|
|
":esbuild_base",
|
|
],
|
|
)
|
|
|
|
esbuild_config(
|
|
name = "esbuild_config_spec",
|
|
testonly = True,
|
|
config_file = "esbuild-spec.config.mjs",
|
|
deps = [
|
|
":esbuild_base",
|
|
],
|
|
)
|