Skip to content

ts_devserver: ibazel livereloading if concatjs bundle is not used #1036

@devversion

Description

@devversion

🐞 bug report

Affected Rule

ts_devserver (@bazel/typescript)

Is this a regression?

No

Description

In some scenarios the concatjs bundle is not desired/used. e.g. for lazy loading.

One could say that in that case the concatjs bundle can be just empty.. but that doesn't work because the deps attribute will be used to add the lazy input files to the servable runfiles (that's a different issue though).

🔥 Exception or Error

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.

Anything else relevant?

One easy solution would be to provide a proxy URL in the devserver that always redirects to the URL specified in the IBAZEL_LIVERELOAD_URL environment variable.

I will have a look into this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions