mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
445fbf81fd
Previously devtools used a nested workspace for its bazel configurations. This meant framework dependencies were consumed via npm. Now devtools is part of the root bazel directory that all other files in this codebase fall under. This allows us to build devtools using local angular packages, removing the need to consume these dependencies with npn. This is useful because we no longer have to update these dependencies with an automated tool like renovate, and our CI tests will always run against the most up to date framework packages.
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
|
|
load("//tools:defaults.bzl", "ts_library")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
exports_files(["launcher_template.sh"])
|
|
|
|
ts_library(
|
|
name = "dev-server_lib",
|
|
srcs = [
|
|
"dev-server.ts",
|
|
"ibazel.ts",
|
|
"main.ts",
|
|
],
|
|
# TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`.
|
|
devmode_module = "commonjs",
|
|
deps = [
|
|
"@npm//@types/browser-sync",
|
|
"@npm//@types/minimist",
|
|
"@npm//@types/node",
|
|
"@npm//@types/send",
|
|
"@npm//browser-sync",
|
|
"@npm//minimist",
|
|
"@npm//send",
|
|
],
|
|
)
|
|
|
|
nodejs_binary(
|
|
name = "dev-server_bin",
|
|
data = [
|
|
":dev-server_lib",
|
|
],
|
|
entry_point = ":main.ts",
|
|
# TODO(josephperrott): update dependency usages to no longer need bazel patch module resolver
|
|
# See: https://github.com/bazelbuild/rules_nodejs/wiki#--bazel_patch_module_resolver-now-defaults-to-false-2324
|
|
templated_args = ["--bazel_patch_module_resolver"],
|
|
)
|