Altair and other JS extensions do not work in Voila or Colab
In https://github.com/widgetti/solara/blob/master/solara/widgets/vue/vegalite.vue
we assume the /_solara/_cdn/ endpoint can be reached. This endpoint exists in notebook, lab and solara server, but not in Voila (except when running as a voila extension in jupyter server) or colab.
A workaround for now is to manually set the solara_cdn javascript variable.
import IPython.display
# make solara use a real cdn, since the solara cdn proxy is not available
display(IPython.display.Javascript("solara_cdn = 'https://cdn.jsdelivr.net/npm/'"))
Found this our while writing a test for https://github.com/widgetti/solara/pull/479
Altair should work now due to #487, other js libraries not yet
Should be fixed due to #479
Keeping this open till we fix this for the other libraries.
Fixed in #763 (Solara 1.39.0)