diff --git a/examples/angular/src/BUILD.bazel b/examples/angular/src/BUILD.bazel index 817b35d40f..fcc82bfc9e 100644 --- a/examples/angular/src/BUILD.bazel +++ b/examples/angular/src/BUILD.bazel @@ -1,3 +1,4 @@ +load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web") load("@io_bazel_rules_docker//container:container.bzl", "container_image") load("@io_bazel_rules_docker//nodejs:image.bzl", "nodejs_image") load("@io_bazel_rules_sass//:defs.bzl", "sass_binary") @@ -8,7 +9,6 @@ load("@npm_bazel_inject_html//:index.bzl", "inject_html") load("@npm_bazel_rollup//:index.bzl", "rollup_bundle") load("@npm_bazel_terser//:index.bzl", "terser_minified") load("@npm_bazel_typescript//:index.bzl", "ts_config", "ts_devserver", "ts_library") -load("@build_bazel_rules_nodejs//index.bzl", "pkg_web") package(default_visibility = ["//:__subpackages__"]) @@ -166,8 +166,10 @@ terser_minified( inject_html( name = "inject_scripts_for_prod", src = "//src:example/index.prod.html", - # we can't produce "example/index.html" since that collides with the devmode file - # pkg_web rule will re-root this path because it starts with _prodapp + # we can't output "src/example/index.html" since that collides with the devmode file. + # pkg_web rule will re-root paths that start with _{name} by default + # so we output "_prodapp/src/example/index.html" so that it is mapped to + # `example/index.html` in the web package. out = "_prodapp/src/example/index.html", assets = _ASSETS, ) diff --git a/examples/app/BUILD.bazel b/examples/app/BUILD.bazel index 76dd0214bb..91d1d0b662 100644 --- a/examples/app/BUILD.bazel +++ b/examples/app/BUILD.bazel @@ -37,15 +37,16 @@ _ASSETS = [ "//styles:test.css", ] +# Copy index.html to the output folder, adding