angular/modules/playground/src/model_driven_forms/BUILD.bazel
Paul Gschwendtner 3c9b4b51e2 refactor: update modules/ benchmarks and playgrounds to work with ESM (#48521)
* Switches away from the ESM-incompatible & unmaintained `ts_devserver`
  to `http_server`. This is the canonical server maintained by dev-infra
* Switches tests away from CommonJS specific logic. e.g. require.resolve
* Adjusts tests to work with Protractor spec bundling (Protractor does
  not support ESM execution, but we want to take ESM-written specs)
* Reworks playground and benchmarks to use `app_bundle` and `esbuild`
  instead of loading hundreds of files individually. This also makes
  tests more stable and more aligned with real applications.

PR Close #48521
2022-12-19 19:50:44 +00:00

32 lines
722 B
Text

load("//tools:defaults.bzl", "app_bundle", "http_server", "ng_module")
package(default_visibility = ["//modules/playground:__subpackages__"])
ng_module(
name = "model_driven_forms",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
deps = [
"//packages/core",
"//packages/forms",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
],
)
app_bundle(
name = "app_bundle",
entry_point = ":index.ts",
deps = [":model_driven_forms"],
)
http_server(
name = "devserver",
srcs = [
"index.html",
],
deps = [
":app_bundle",
"//packages/zone.js/bundles:zone.umd.js",
],
)