How to set up CDN acceleration for static files across multiple extensions?
I am using extensions such as @jupyterlab/git, jupyterlab_tensorboard_pro, and @jupyter-lsp/jupyterlab-lsp. Currently, there are many small JavaScript files, and I would like to deploy these small files on a content delivery network (CDN). How should I configure it? I tried to place them in the jupyter/labextensions/ directory, and then set c.ExtensionApp.static_url_prefix = "xxx/jupyter/labextensions/" in the configuration, but it did not take effect. @minrk @jdfreder @takluyver
Proposed Solution
Additional context
Hi @ying2025 thank you for opening this issue, @krassowski has found that this was previously discussed in https://github.com/jupyterlab/jupyterlab/issues/5449 and the trait still exists in https://github.com/jupyterlab/jupyterlab/blob/7a5657937ddfb26a5c9287a0c24d947563809382/jupyterlab/labapp.py#L514-L521, but has not been documented. If you could take a look and see if this information helps you?
thank you for opening this issue, @krassowski has found that this was previously discussed in jupyterlab/jupyterlab#5449 and the trait still exists in https://github.com/jupyterlab/jupyterlab/blob/7a5657937ddfb26a5c9287a0c24d947563809382/jupyterlab/labapp.py#L514-L521, but has not been documented. If you could take a look and see if this information helps you?
c.LabApp.override_static_url only overrides the static resources of the Lab, but it seems to have no effect on the static resources of extensions. There is a c.LabServerApp.labextensions_url, which seems to work for extensions by setting it. When accessing the path through frontend JavaScript, it appears to be accessing the CDN