Skip to content

Commit

Permalink
refactor(examples): use dev/prod entry points in angular app (#3053)
Browse files Browse the repository at this point in the history
this enables the `main.dev.ts` file to be used as entry
point served in devmode and also removes some unused files
  • Loading branch information
mgred authored Nov 4, 2021
1 parent ccf54bc commit 4127d29
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 820 deletions.
9 changes: 5 additions & 4 deletions examples/angular/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ rollup_bundle(
name = "bundle-es2015",
config_file = "rollup.config.js",
entry_points = {
":main.prod.ts": "index",
":main.prod.ts": "index.prod",
":main.dev.ts": "index.dev",
},
output_dir = True,
deps = [
Expand Down Expand Up @@ -117,7 +118,7 @@ html_insert_assets(
"--roots=. $(RULEDIR)",
"--assets",
] + ["$(execpath %s)" % s for s in _ASSETS] + [
"--scripts --module $(execpath :bundle-es2015)/index.js",
"--scripts --module $(execpath :bundle-es2015)/index.dev.js",
],
data = [
"//src:example/index.html",
Expand Down Expand Up @@ -172,8 +173,8 @@ html_insert_assets(
"--roots=. $(RULEDIR)",
"--assets",
] + ["$(execpath %s)" % s for s in _ASSETS] + [
"--scripts --module $(execpath :bundle-es2015.min)/index.js",
"--scripts --nomodule $(execpath :bundle-es5.min)/index.js",
"--scripts --module $(execpath :bundle-es2015.min)/index.prod.js",
"--scripts --nomodule $(execpath :bundle-es5.min)/index.prod.js",
],
data = [
"//src:example/index.html",
Expand Down
2 changes: 1 addition & 1 deletion examples/angular/src/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</head>
<body>
<!-- The Angular application will be bootstrapped into this element. -->
<app-component></app-component>
<app-component></app-component>
</body>
</html>
32 changes: 0 additions & 32 deletions examples/angular/src/example/index.prod.html

This file was deleted.

Loading

0 comments on commit 4127d29

Please sign in to comment.