angular/adev/shared-docs/pipeline/examples/stackblitz/BUILD.bazel
Joey Perrott e8c5603126 build: move all rule/macro loading into adev/defaults.bzl and fix intellisense loading (#62627)
Move all of our loading into a local defaults.bzl file instead of mixed loading via tools/defaults and adev/defaults

PR Close #62627
2025-07-14 15:47:05 -07:00

56 lines
1.3 KiB
Text

load("//adev/shared-docs:defaults.bzl", "esbuild", "ts_project")
package(default_visibility = ["//visibility:public"])
ts_project(
name = "stackblitz",
srcs = glob(
[
"*.mts",
],
exclude = [
"index.mts",
],
),
enable_runtime_rnjs_interop = True,
deps = [
"//adev:node_modules/@types/jsdom",
"//adev:node_modules/@types/node",
"//adev:node_modules/jsdom",
"//adev:node_modules/tinyglobby",
"//adev/shared-docs/pipeline/examples/shared:shared_rjs",
"//adev/shared-docs/pipeline/guides:guides_lib_rjs",
],
)
ts_project(
name = "index",
srcs = [
"index.mts",
],
enable_runtime_rnjs_interop = True,
visibility = [
"//adev/shared-docs:__subpackages__",
],
deps = [
":stackblitz_rjs",
"//adev:node_modules/@types/node",
],
)
esbuild(
name = "bundle",
config = "//adev/shared-docs/pipeline:esbuild-config",
entry_point = ":index.mts",
# JSDOM should not be bundled because it has workers and dynamic imports.
external = ["jsdom"],
format = "esm",
output = "stackblitz.mjs",
platform = "node",
target = "es2022",
tsconfig = "//adev/shared-docs:tsconfig_build",
visibility = ["//visibility:public"],
deps = [
":index_rjs",
],
)