Attention: Dynamic plugins are a work-in-progress feature. Please do try it out and give feedback, but use only at your own risk!
This project is meant to be used as a template to create your own Chart Plugins for Superset.
For now, you can fork this project to get started. Delete the .git folder and run git init if you want a clean commit history.
In the future we plan on adding a Yeoman script, and potentially moving portions of this code into a library to make plugin development simpler.
To build the plugin:
npm install
npm run build # or npm run build:watchSuperset will need to load your built plugin bundle from somewhere. You can serve the plugin locally using the following command:
npm run serveWhile serving up the local plugin, you can add it to your locally running Superset instance under "Custom Plugins". Make sure the DYNAMIC_PLUGINS feature flag is on in Superset. Use the the locally hosted bundle url http://127.0.0.1:8080/main.js when configuring your plugin.
To build for production:
npm run build-prodThe serve command should only be used for local development. In production, it is recommended to host the bundle output of build (located in /dist) on a CDN. The address of the CDN-hosted bundle is then what should be used when adding the plugin to Superset.