Distribute a feature layer
Official layers use Nuxt's npm-layer model: the package entry point is nuxt.config.ts, consumers compose it with extends, and the layer declares a stable $meta.name.
Package contract
A distributable layer should provide:
name, SemVerversion,publishConfig.access, explicitfiles, and explicitexports;- Nuxt and shared framework libraries as compatible peers and development dependencies;
- every library imported at runtime in its owning package's dependencies;
- a
portal-manifestexport with provider ID, version, dependencies, schema, and immutable migrations; - public
feature,types, andschemaexports when applicable; - no host aliases, repository-relative imports, demo branding, or physical cross-package paths.
Package code imports core services from @nuxt-customer-portal/core/server and contracts from @nuxt-customer-portal/core/feature. Cross-organization requests are rejected by server authorization, regardless of the client shell.
Verify the artifact
Run pnpm pack and inspect the tarball rather than testing only through workspace links. Install only produced tarballs into a clean external fixture and run prepare, typecheck, build, and migration diagnostics. The repository CI repeats this for pnpm, npm, Yarn, and Bun.
Official packages use linked alpha versions and Changesets. Third-party layers choose their own SemVer policy, but should state the supported Nuxt Customer Portal revision or package range and never mutate an already released migration file.