The interface plugin
InterfacePlugin() gives the module a plugin for the CMS interface
(chapter 20): an ES module whose default export is
definePlugin(…), embedded in the module's assembly with the files it imports:
<EmbeddedResource Include="ui\**" LogicalName="cms-ui/%(RecursiveDir)%(Filename)%(Extension)" />- The entry,
ui/index.js, can be plain JavaScript, withcreateElementin place of JSX and no build step, or TypeScript built with@relatude/plugin-kit. Without it,AddModulethrows. - The CMS API serves the files at
{api}/modules/{name}/{version}/…, and browsers cache them for good. The version is the assembly's informational version, unless the module overridesVersion. - When it starts, the CMS interface asks for the site's modules (the
cms-modulescommand) and imports the interface plugin of every active one. Bare imports, such asreact, resolve to the interface's own copies.