Architecture

  • Build: library mode generates an IIFE bundle at dist/index.iife.js via vite.config.lib.ts.

  • Registration: the bundle self-registers with the global Octopus host (IIFE waiting for Octopus.registerWidget).

  • Consumption: octopus-frontend can import/serve the IIFE bundle and the widget will register under its key variableSelector.

  • Types: TypeScript types are emitted to dist/src/index.d.ts for integration safety.