deco-next-package-migration

Installation
SKILL.md

Deco Next.js Package Migration

Moves a Next.js site off the reverted @decocms/start@5.x framework-agnostic-entrypoints tiers onto the current package split. Proven on faststore-fila, a production Next.js 15 App Router VTEX FastStore storefront with a pre-existing .deco/blocks/*.json legacy content snapshot.

When this applies

  • package.json has "@decocms/start": "5.x-next.*" or similar prerelease pin
  • Code imports from @decocms/start/next, @decocms/start/core, or @decocms/start/node
  • The site has its own src/sdk/deco/-style wrapper layer (or equivalent) around the framework, rather than using the framework's route/page helpers directly

Import mapping

See references/import-mapping.md for the full table. Summary: @decocms/start/core's CMS functions (setBlocks, registerSectionLoaders, etc.) move to @decocms/blocks/cms under the same names — these did not change across the package split, only the import path. Replace @decocms/start/next's createDecoAdminRouteHandlers with createDecoRouteHandlers from @decocms/nextjs/routeHandlers, plus createDecoPreviewPage from @decocms/nextjs for RSC-aware gallery previews. Page-level CMS resolution goes through @decocms/blocks/cms's resolveDecoPage + extractSeoFromSections directly (or @decocms/nextjs's generic createDecoPage helper, if the site doesn't need custom SEO-merging/curated-block-override logic). @decocms/start/node's loadAllDecofileBlocks has no equivalent — if the site loads a directory of pre-existing legacy block JSON files (not build-time-generated ones), use @decocms/blocks/cms/loadDecofileDirectory (new).

Steps

Installs
4
Repository
decocms/blocks
GitHub Stars
5
First Seen
Jul 13, 2026
deco-next-package-migration — decocms/blocks