build: update integration/bazel & @angular/bazel schematics to rules_nodejs 1.0.0 (#34736)
For the purposes of the integration test the zone.js script & bundle script tags can just go into the source index.html itself. The purpose of the integration test is is to test @angular/bazel & ng_module & ng_package so there is no need to exercise html_insert_assets in integration/bazel. PR Close #34736
This commit is contained in:

committed by
Matias Niemelä

parent
45ae62787a
commit
96a61d21db
@ -1,8 +1,8 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@npm_angular_bazel//:index.bzl", "ng_module")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web")
|
||||
load("@npm//http-server:index.bzl", "http_server")
|
||||
load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package")
|
||||
load("@npm_angular_bazel//:index.bzl", "ng_module")
|
||||
load("@npm_bazel_rollup//:index.bzl", "rollup_bundle")
|
||||
load("@npm_bazel_terser//:index.bzl", "terser_minified")
|
||||
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
|
||||
@ -36,13 +36,16 @@ filegroup(
|
||||
|
||||
ts_devserver(
|
||||
name = "devserver",
|
||||
additional_root_paths = ["npm/node_modules/zone.js/dist"],
|
||||
entry_module = "bazel_integration_test/src/main",
|
||||
index_html = "index.html",
|
||||
scripts = [
|
||||
":rxjs_umd_modules",
|
||||
],
|
||||
# Use the same bundle serving path as prodserver so that we can share
|
||||
# an index.html file.
|
||||
serving_path = "/bundle.min.js",
|
||||
static_files = [
|
||||
"index.html",
|
||||
"@npm//:node_modules/zone.js/dist/zone.min.js",
|
||||
],
|
||||
deps = ["//src"],
|
||||
@ -64,14 +67,14 @@ terser_minified(
|
||||
src = ":bundle",
|
||||
)
|
||||
|
||||
web_package(
|
||||
pkg_web(
|
||||
name = "prodapp",
|
||||
assets = [
|
||||
# do not sort
|
||||
"@npm//:node_modules/zone.js/dist/zone.min.js",
|
||||
srcs = [
|
||||
"index.html",
|
||||
":bundle.min",
|
||||
"@npm//:node_modules/zone.js/dist/zone.min.js",
|
||||
],
|
||||
index_html = "index.html",
|
||||
additional_root_paths = ["npm/node_modules/zone.js/dist"],
|
||||
)
|
||||
|
||||
http_server(
|
||||
|
@ -9,5 +9,7 @@
|
||||
<body>
|
||||
<!-- The Angular application will be bootstrapped into this element. -->
|
||||
<app-component></app-component>
|
||||
<script src="/zone.min.js"></script>
|
||||
<script src="/bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user