Bundled plugins with React and JSX
Bundled plugins with React and JSX
Section intitulée « 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:
bun run plugin:new my-plugin # scaffoldbun run plugin:build my-plugin # bundle to public/plugins/my-plugin/bun run plugin:watch my-plugin # rebuild on changeReact 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