docs/features/plugin-system.md:970 names @instatic/plugin-sdk as the import specifier for plugin sources, but there is no such package to resolve: node_modules/@instatic does not exist and package.json has no exports map pointing at it. A plugin developed outside the Instatic monorepo therefore cannot import the SDK by the documented specifier.
Workaround I am using: import the SDK by absolute path through a single indirection file, so the path lives in exactly one place:
// vendor-sdk.ts
export * from '/path/to/Instatic/src/core/plugin-sdk/index.ts'
My build script rewrites that one line from an INSTATIC env var before invoking the CLI. Lint, build and the sandbox scan all pass this way, so nothing is fundamentally blocked — it is just that the documented path does not work and every out-of-tree plugin has to invent the same workaround.
Either fix would do:
- publish
@instatic/plugin-sdk (or have the CLI inject a resolvable alias when it builds a directory outside the monorepo), or
- document the monorepo-only constraint in the "Local dev with hot sync" section, so people know to expect it.
The first is obviously nicer for anyone distributing a plugin, since it also makes bun test on plugin sources work without a checkout of the whole CMS.
docs/features/plugin-system.md:970names@instatic/plugin-sdkas the import specifier for plugin sources, but there is no such package to resolve:node_modules/@instaticdoes not exist andpackage.jsonhas noexportsmap pointing at it. A plugin developed outside the Instatic monorepo therefore cannot import the SDK by the documented specifier.Workaround I am using: import the SDK by absolute path through a single indirection file, so the path lives in exactly one place:
My build script rewrites that one line from an
INSTATICenv var before invoking the CLI. Lint, build and the sandbox scan all pass this way, so nothing is fundamentally blocked — it is just that the documented path does not work and every out-of-tree plugin has to invent the same workaround.Either fix would do:
@instatic/plugin-sdk(or have the CLI inject a resolvable alias when it builds a directory outside the monorepo), orThe first is obviously nicer for anyone distributing a plugin, since it also makes
bun teston plugin sources work without a checkout of the whole CMS.