docs(skills): autoconfigApps fails in prod build + validate on prod not dev#337
Open
hugo-ccabral wants to merge 1 commit into
Open
docs(skills): autoconfigApps fails in prod build + validate on prod not dev#337hugo-ccabral wants to merge 1 commit into
hugo-ccabral wants to merge 1 commit into
Conversation
The big storefront-tanstack finding: autoconfigApps configures apps via a
dynamic import("./mod") that resolves in `vite dev` but NOT in the vite/workerd
production bundle — and the catch{} swallows it, so the app's loaders silently
never register (PDP renders "Page not found" in prod, works in dev). Fix: pass
the module statically in APP_REGISTRY. Also add a verification gate: dev smoke
is not enough — validate the PRODUCTION build (bun run preview) + a client-
deferred page (PDP) in a headless browser, since deferred/_serverFn loads and
prod-only failures are invisible to curl + dev. Corrected the .ts-fix version
to 7.11.2.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nicacioliveira
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second batch of storefront-tanstack findings for the
decocms-v6-to-v7-upgradeskill (follow-up to #336), from debugging why the migrated PDP rendered "Page not found" only in production.The finding
autoconfigAppsconfigures each app via its registry entry'smodule— for@decocms/apps-shopifythat's() => import("./mod"). That dynamic import resolves undervite devbut NOT in the vite/workerd production bundle, and autoconfig'scatch {}swallows the error — so the app is skipped, its commerce loaders never register, and (deferred) PDP/shelves resolve tonull. Invisible in dev, in curl'd SSR HTML, and even in a directresolveValue. Fix: pass the module statically (import * as shopifyMod from "@decocms/apps-shopify/mod"; [{ ...SHOPIFY_REGISTRY_ENTRY, module: async () => shopifyMod }]).Also
bun run devis not a pass — validate the production build (bun run preview) + a client-deferred page (PDP) in a headless browser (Playwright /deco-e2e-testing), since deferred/_serverFn/loads + prod-only failures don't show in dev/curl. Includes how to read the deferred request/response +x-cache..ts-fix version reference to 7.11.2 (it shipped as a patch, not 7.12.0).Docs-only.
🤖 Generated with Claude Code
Summary by cubic
Documented a production-only
autoconfigAppsfailure and how to fix it, and added a gate to validate the production build + deferred PDP/PLP pages. Also corrected the.tssuffix fallback fix version to@decocms/blocks7.11.2.Bug Fixes
autoconfigAppsuses dynamic() => import("./mod")in each registry entry, which works invite devbut fails in the vite/workerd production bundle. The silentcatch {}skips the app, so its loaders never register and PDPs render "Page not found". Fix: pass the module statically, e.g.import * as shopifyMod from "@decocms/apps-shopify/mod"; [{ ...SHOPIFY_REGISTRY_ENTRY, module: async () => shopifyMod }]..ts/.tsxresolveType fallback shipped in@decocms/blocks7.11.2 (not 7.12.0).Migration
bun run dev. Validate the production bundle withbun run previewand load a real deferred PDP/PLP in a headless browser, ensuring product data renders (and inspecting the/_serverFn/call andx-cache).Written for commit 0830b3d. Summary will update on new commits.