build(ivy): make sure animation_world prodserver and devserver work as expected (#32778)
PR Close #32778
This commit is contained in:
parent
04ddcfecd8
commit
7a00c676ec
|
@ -2,6 +2,7 @@ package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
|
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
|
||||||
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server")
|
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server")
|
||||||
|
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
|
||||||
|
|
||||||
ng_module(
|
ng_module(
|
||||||
name = "animation_world",
|
name = "animation_world",
|
||||||
|
@ -30,8 +31,32 @@ ng_rollup_bundle(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
http_server(
|
ts_devserver(
|
||||||
name = "devserver",
|
name = "devserver",
|
||||||
|
additional_root_paths = [
|
||||||
|
"npm/node_modules/tslib",
|
||||||
|
],
|
||||||
|
entry_module = "@angular/core/test/bundling/animation_world",
|
||||||
|
scripts = [
|
||||||
|
"//tools/rxjs:rxjs_umd_modules",
|
||||||
|
],
|
||||||
|
# Use a serving_path that matches the common static index.html used
|
||||||
|
# in both devserver & prodserver
|
||||||
|
serving_path = "/bundle.min.js.br",
|
||||||
|
static_files = [
|
||||||
|
"animation_world.css",
|
||||||
|
"base.css",
|
||||||
|
"index.html",
|
||||||
|
"@npm//tslib",
|
||||||
|
],
|
||||||
|
tags = [
|
||||||
|
"ivy-only",
|
||||||
|
],
|
||||||
|
deps = [":animation_world"],
|
||||||
|
)
|
||||||
|
|
||||||
|
http_server(
|
||||||
|
name = "prodserver",
|
||||||
data = [
|
data = [
|
||||||
"animation_world.css",
|
"animation_world.css",
|
||||||
"base.css",
|
"base.css",
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
-->
|
-->
|
||||||
<script>
|
<script>
|
||||||
document.write('<script src="' +
|
document.write('<script src="' +
|
||||||
(document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js') +
|
(document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') +
|
||||||
'"></' + 'script>');
|
'"></' + 'script>');
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue