Summary
Serve plugin frontend ES modules under the host import map. Each plugins web/ directory is served at /_plugins/{slug}/{version}/... with cache-forever headers. Core admin/site responses include an import map containing entries for @host/sdk, host-provided react, and @plugin/{slug} for each active plugin. SRI hashes are included in script tags.
Design reference
- docs/02-plugin-system.md §7.1, §7.6
Acceptance criteria
Dependencies
#45 (lifecycle)
Complexity
M
Summary
Serve plugin frontend ES modules under the host import map. Each plugins
web/directory is served at/_plugins/{slug}/{version}/...withcache-foreverheaders. Core admin/site responses include an import map containing entries for@host/sdk, host-provided react, and@plugin/{slug}for each active plugin. SRI hashes are included in script tags.Design reference
Acceptance criteria
GET /_plugins/{slug}/{version}/{path...}serves files from the activated pluginsweb/directory;Cache-Control: public, max-age=31536000, immutable..or absolute paths)web/assets/with appropriate Content-Type sniffing@host/sdkserved at/_host/sdk-{version}.js; bundled separately, content-hashed in URL/_host/react-{version}.jsand/_host/react-dom-{version}.js(single host copy used by all plugins per §7.2)<script type="importmap">with entries for@host/sdk,react,react-dom, and@plugin/{slug}for each active pluginintegrity="sha384-..."SRI hash computed at installawait import(p.entry)for eachhost.activePlugins, thenhost.boot()Dependencies
#45 (lifecycle)
Complexity
M