
The current build workflow depends on cross workspace dependency by installing angular-cli as a Bazel repository. This is not ideal because it introduces separate node_module directories other than the one installed by Angular through the yarn_install rule (ngdeps). This commit removes angular-cli from the Bazel workspace and installs rollup and @angular-devkit/build-optimizer locally. PR Close #28215
33 lines
884 B
Python
33 lines
884 B
Python
package(default_visibility = ["//visibility:public"])
|
|
|
|
filegroup(
|
|
name = "package_assets",
|
|
srcs = ["modify_tsconfig.js"],
|
|
visibility = ["//packages/bazel:__subpackages__"],
|
|
)
|
|
|
|
# For generating skydoc
|
|
exports_files(glob(["*.bzl"]))
|
|
|
|
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
|
|
|
|
nodejs_binary(
|
|
name = "rollup_with_build_optimizer",
|
|
data = [
|
|
"@ngdeps//@angular-devkit/build-optimizer",
|
|
"@ngdeps//is-builtin-module",
|
|
"@ngdeps//rollup",
|
|
"@ngdeps//rollup-plugin-node-resolve",
|
|
"@ngdeps//rollup-plugin-sourcemaps",
|
|
],
|
|
entry_point = "ngdeps/node_modules/rollup/bin/rollup",
|
|
install_source_map_support = False,
|
|
)
|
|
|
|
nodejs_binary(
|
|
name = "modify_tsconfig",
|
|
data = ["modify_tsconfig.js"],
|
|
entry_point = "angular/packages/bazel/src/modify_tsconfig.js",
|
|
install_source_map_support = False,
|
|
)
|