You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if we could support ESM plugins with multiple files. Right now our restrictions are CJS and a single file. This results in some potentially large plugin files without the ability to lazy load.
For example, we could lazy load the majority of the plotly-express plugin. Right now it will all be fetched at initial page load, but we could load just the object that says what types it supports and lazy import the component when it's needed.
I don't think the remote-component-loader library we use can handle ESM. We could probably support this natively with import maps (MDN page). The difficulty with import maps would be ensuring everything still works with Vite (I think dev mode would be the trickiest) like the React contexts
I've done some basic testing and our DHC config at least sends back any extra files I put in the plugins directory, so an await import('/js-plugins/my-plugin.js') which imports other files around it should work just fine as far as the server is concerned.
The text was updated successfully, but these errors were encountered:
It would be great if we could support ESM plugins with multiple files. Right now our restrictions are CJS and a single file. This results in some potentially large plugin files without the ability to lazy load.
For example, we could lazy load the majority of the plotly-express plugin. Right now it will all be fetched at initial page load, but we could load just the object that says what types it supports and lazy import the component when it's needed.
I don't think the remote-component-loader library we use can handle ESM. We could probably support this natively with import maps (MDN page). The difficulty with import maps would be ensuring everything still works with Vite (I think dev mode would be the trickiest) like the React contexts
I've done some basic testing and our DHC config at least sends back any extra files I put in the plugins directory, so an
await import('/js-plugins/my-plugin.js')
which imports other files around it should work just fine as far as the server is concerned.The text was updated successfully, but these errors were encountered: