bazelbuild / rules_typescript

MOVED to https://github.com/bazelbuild/rules_nodejs/tree/3.x/third_party/github.com/bazelbuild/rules_typescript
https://github.com/bazelbuild/rules_nodejs
Apache License 2.0
275 stars 94 forks source link

feat(devserver): support specifying ibazel livereload script location #468

Closed devversion closed 4 years ago

devversion commented 5 years ago

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