Nexus Plugins development

Your plugin must export a default function with the following signature:

export default ({ ref: HTMLElement, nexusClient: NexusClient, resource: Resource<T> }) => {
  return () => {
    // optional callback when your plugin is unmounted from the page
  };
};

Nexus Plugin uses SystemJS.

You have to transpile and bundle your code using SystemJS as output:

  • with rollup: use system as output format
  • with webpack: use system as outputTarget

Configuring Nexus to run your plugins

Once you have your javascript bundled into a single file, you can place it in the ./plugins folder at the root of your Nexus Web instance.

Plugins should follow this folder naming convention:

.
│   README.md
│
└───plugins
│   └───my-nexus-plugin
│       │   index.js
│   └───yet-another-nexus-plugin
│       │   index.js
│   ...

Once restarted, your Nexus Web instance will read the available files, which will be visible to add in the Dashboard Edit Form via an autocomplete searchbox.

Read about configuring a Studio Dashboard