Aller au contenu

Bundled plugins with React and JSX

Write a real plugin in plugins/<name>/ (TypeScript, JSX, npm imports) and build it with the shell’s tooling:

Fenêtre de terminal
bun run plugin:new my-plugin # scaffold
bun run plugin:build my-plugin # bundle to public/plugins/my-plugin/
bun run plugin:watch my-plugin # rebuild on change

React is never bundled: imports of react / react/jsx-runtime are redirected to a bridge that reuses the shell’s instance (setReact(ctx.react) at the top of setup()). Install the result from the Plugins panel: /plugins/my-plugin/index.js.

Documentation sous licence CC BY 4.0 · © les contributeurs de SCFlow ·Retour à supplychainflow.org