Skip to content

Commit bae65b3

Browse files
devversionjelbourn
authored andcommitted
build: workaround for dev-app livereloading with ibazel (#16882)
Adds a workaround that makes livereloading work most of the time. It won't work if the default port for the ibazel livereloading script has changed. This can happen if the port is already used/reserved or if the default port changes in the `livereload-server` implementation. Ideally the livereloading script would be served from a canonical location that always works (regardless of the port). A proposal for this has been submitted within: bazelbuild/rules_typescript#468
1 parent 21228c7 commit bae65b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/dev-app/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
<body>
2525
<dev-app>Loading...</dev-app>
2626
</body>
27+
<!--
28+
Sets up the live reloading script from ibazel if present. This is a workaround
29+
and will not work if the port changes (in case it is already used).
30+
TODO(devversion): replace once https://github.com/bazelbuild/rules_nodejs/issues/1036 is fixed.
31+
-->
32+
<script src="http://localhost:35729/livereload.js?snipver=1" async></script>
2733
<script src="core-js/client/core.js"></script>
2834
<script src="zone.js/dist/zone.js"></script>
2935
<script src="hammerjs/hammer.min.js"></script>

0 commit comments

Comments
 (0)