The livereloading script from ibazel is currently served at a non-static URL. Meaning
that we can't just add a script import to the livereload script in the index.html.
If the ts_devserver uses the concatjs bundle it works because the devserver go
implementation currently reads the IBAZEL_LIVERELOAD_URL environment variable
and adds the script to the concatjs bundle automatically.
In the other scenario where concatjs is not used, developers need a way to specify
where the livereload script should be loaded from (meaning that there is a predictable
URL for the script). This commit adds a flag to the devserver binary that can be used to
set a specific URL where the livereloading script should be served from. This is achieved
by forwarding all request for that URL to the actual ibazel livereloading script.
The livereloading script from ibazel is currently served at a non-static URL. Meaning that we can't just add a script import to the livereload script in the index.html.
If the ts_devserver uses the concatjs bundle it works because the devserver go implementation currently reads the
IBAZEL_LIVERELOAD_URL
environment variable and adds the script to the concatjs bundle automatically.In the other scenario where concatjs is not used, developers need a way to specify where the livereload script should be loaded from (meaning that there is a predictable URL for the script). This commit adds a flag to the devserver binary that can be used to set a specific URL where the livereloading script should be served from. This is achieved by forwarding all request for that URL to the actual ibazel livereloading script.
References https://github.com/bazelbuild/rules_nodejs/issues/1036