Building your plugin's frontend
Every plugin frontend (a pages[].component, a field_types[].component, an
admin_tabs[].component, a tool_tabs[].component, an editor_steps[].module, an editor_tools[].options, ...) compiles through the single shared toolchain in
content/plugins/package.json (esbuild + esbuild-svelte, pinned to the frontend's Svelte
major), driven by scripts/build-plugins.mjs:
cd content/plugins && npm install # once
node ../../scripts/build-plugins.mjs [pluginId ...] # or: npm run build:plugins from frontend/The script auto-detects each plugin's build shape from frontend/src/ (a page with
index.js, or standalone components referenced from manifest.yml) and writes to
frontend/dist/, which you commit alongside your source change.
Two build modes:
- release (default) — minified, no source maps, deterministic (identical inputs produce
byte-identical output). This is what belongs in a committed
frontend/dist/. - debug — pass
--debugor setPLUGIN_BUILD=debugfor unminified output with source maps, to step through your plugin dist in the browser devtools. Never commit a debug build.
Both modes preserve upstream license notices (legalComments: 'eof') from the bundled
Svelte runtime and any other bundled dependency.