Storefront → Templates → Migration
Migration checklist
Walk through this list before merging a migration PR.
Use this list as the gate between "migration done" and "merge to main." If any box is unchecked and you don't have a written reason, fix it first.
Build & types
-
npm run typecheckis clean (no errors, no warnings about implicitany). -
npm run lintis clean. -
npx vite buildproduces a bundle without warnings about missing imports. -
npx wrangler deploy --dry-runsucceeds. -
npx tsr generateproduces no errors. - No remaining imports from
@deco/deco/*,$fresh/*,preact/*, or@preact/signals. - No
Deno.env.get(...)calls outsidenode_modules. - No
src/islands/directory. - Obsolete site-specific compatibility shims are removed or documented after their replacements are verified.
Generated files
-
src/server/cms/blocks.gen.jsonexists and is non-empty. -
src/server/cms/sections.gen.tslists all expected sections. -
src/server/cms/loaders.gen.tslists all expected loaders. -
meta.gen.jsonvalidates against an expected JSON Schema (/live/_metareturns 200 with valid content).
Required wiring
-
src/setup.tsimports come first insrc/server.tsandsrc/worker-entry.ts. -
src/worker-entry.tscallscreateDecoWorkerEntrywith the 7.x admin handlers from the TanStack runtime guide. -
vite.config.tsincludesdecoVitePlugin()and thededupelist. -
wrangler.jsonchasnodejs_compatandno_handle_cross_request_promise_resolutionflags. -
wrangler.jsoncmainpoints at./src/worker-entry.ts.
Routes
-
src/routes/__root.tsxexists and renders the global shell. -
src/routes/index.tsxusescmsHomeRouteConfig. -
src/routes/$.tsxusescmsRouteConfig. -
siteNamematches the existing storefront configuration. Studio repository import and preview configuration are verified separately; see editor migration. -
ignoreSearchParamsincludesskuId(and any other variant params your site uses).
Sections
- Every section in
.deco/blocks/resolves to a registered file (no "section not found" warnings onnpm run dev). - Every section that had a loader in v1 still has one in Blocks 7.x.
- No section default-exports a non-component (functions, objects, etc.).
-
LoadingFallbackexports exist for every shelf or grid section.
Commerce
VTEX
-
deco-vtexblock in admin hasaccount,appKey,appTokenset. -
setVtexFetch(createInstrumentedFetch("vtex"))runs insetup.ts. - If you used a region-aware fetch in v1, port it — see VTEX gotchas for the canonical pattern.
- PDP renders the right product with the right price for the right region.
- PLP renders products and respects facet filters.
- Search returns results.
- Cart adds, updates, and removes items via
useCart. - Auth flow (sign-in, sign-up, logout) works via
useUser. - Wishlist add/remove via
useWishlist.
Shopify
-
deco-shopifyblock hasstoreNameandstorefrontAccessTokenset. - PDP renders.
- PLP renders.
- Cart cookie is set on first cart access (
getCartwithresponseHeaders).
Admin
-
/live/_metareturns 200 with valid JSON Schema. -
/.decofilereturns 200 with all blocks. - Editing a section in admin triggers a successful
/deco/renderand shows updated preview. - Content is saved to the working branch, reviewed through a PR under project policy, merged, and delivered by the configured deployment. Verify the resulting live page; test runtime/KV cache invalidation separately only when that delivery integration is configured.
Performance
- First contentful paint on the homepage is within budget (target: ≤1.5s on cold cache).
- Deferred sections render their
LoadingFallback, not blank space. - No console errors related to hydration mismatch.
- No CLS from third-party head scripts (GTM, etc.).
-
wrangler tail --format prettyshows reasonable timing breakdowns under load.
Caching
- Edge cache profile is set for the home, PDP, PLP, and search routes.
- Cache purge endpoint works (
?__deco_purge_cache=1). - Static assets bypass the framework (return from
caches.defaultquickly).
SEO & robots
-
robots.txtis correct. -
sitemap.xmlis generated and accessible. - PDP titles and meta descriptions render server-side.
- Open Graph tags render for share previews.
- JsonLd structured data renders on PDP and PLP.
Observability
- OpenTelemetry traces are visible in your dashboard for representative requests.
- Server-Timing headers appear in production responses.
- Health endpoint (
/_healthor your equivalent) returns 200.
Deployment
- Wrangler secrets set: any
appKey/appToken/ API keys your site uses. - KV bindings (e.g.
SITES_KV) set if you use A/B testing or stored redirects. - DNS / custom domain configured if applicable.
-
wrangler deploysucceeds.
QA pass
- Manual click-through of:
- Home → category page → PDP → add to cart → checkout entry.
- Search → search result → PDP.
- Login → account page → logout.
- Mobile (real device or emulator) renders correctly — header, drawer, PDP, cart.
- Bot rendering (curl as Googlebot) returns full HTML for SEO.
Post-merge
- Tag a release.
- Update internal docs / runbooks.
- Notify content team of any admin behavior changes.
- Schedule a review at +1 week and +1 month to catch slow-burn regressions.
Skip a step at your peril. The most common production incidents from migrated sites trace back to checklist items that were "probably fine" rather than verified.