Summary
Catalog of runtime-breaking artifacts the Fresh→TanStack migration left behind (found porting deco-sites/montecarlo-tanstack). Each one crashed SSR/hydration until fixed by hand. The migration transforms should convert or at least flag these; today they pass through silently and break the build/render.
Artifacts found (all fixed manually in the site)
- String
style props (Preact allows, React rejects) — style="a: b", style={"..."}, style={\...`}across ~15 files (Header minicart, Slide, Spacing, Partners, LeadsForm, ProductVariantSelector, BuyTogether, ImageSlider, newsletter popups, GTM). React throws *"Thestyle` prop expects a mapping … not a string"* and kills the section.
asset() Fresh global — src/sections/Fonts/Fonts.tsx used asset(font.source) (from $fresh/runtime), undefined in TanStack → ReferenceError: asset is not defined.
import.meta.resolve(...) — unsupported in the Workers module runner (Searchbar.tsx), crashes dev at load.
platform global — miniCart/Cart.tsx used if (platform === "vtex") with the apps/storefront.ts import commented out → ReferenceError: platform is not defined.
ctx.get({ __resolveType: "resolvables" }) — deco-cx runtime API with no @decocms/blocks equivalent (ProductShelf.tsx) → Cannot read properties of undefined (reading 'get').
ctx.response — not present on the new FnContext (sections/Theme/Fonts.tsx) → SSR crash.
useComponent / sections/Component — HTMX dynamic-section helper deleted, still imported (Searchbar, Suggestions) → unresolved module.
- Duplicate imports — same identifier imported twice (
ImageWidget in SearchResult.tsx) — passes esbuild, fails babel-react-compiler.
- Corrupted ternaries in template-literal classNames — the
${} closing brace was moved into the first branch (\... ${a ? "x"} : "y"`) in Filters.tsx, Aside.tsx, Slide.tsx, PriceFiltersIsland.tsx` → syntax errors.
- Dropped custom Tailwind palette — the v4
@theme reset --color-*: initial but the site's custom colors (perola, perola+, perola-intermediario, …) from the old tailwind.config.ts were never ported → @apply fails: "Cannot apply unknown utility class".
- Broken template literal —
Fonts.tsx had "/styles.css?revision=${await ""}" (invalid) emitted by the migration.
- HTMX residue — the 22 manual-review items in
MIGRATION_REPORT.md (hx-* attributes across search filters, ProductGallery, ProductVariantSelector, etc.) still need React conversion.
- React
key warnings — ~100 Each child in a list should have a unique "key" warnings (Slider/ShelfCollection/…), pre-existing but noisy.
Ask
Extend the blocks-cli transforms to convert (or explicitly flag in the report) items 1–6, 8–11; and keep the HTMX (7, 12) items in the manual-review list (already partially done). Even a deco-post-cleanup rule for string style → object and asset()/import.meta.resolve/platform removal would prevent every migrated site from hitting these.
Summary
Catalog of runtime-breaking artifacts the Fresh→TanStack migration left behind (found porting
deco-sites/montecarlo-tanstack). Each one crashed SSR/hydration until fixed by hand. The migration transforms should convert or at least flag these; today they pass through silently and break the build/render.Artifacts found (all fixed manually in the site)
styleprops (Preact allows, React rejects) —style="a: b",style={"..."},style={\...`}across ~15 files (Header minicart, Slide, Spacing, Partners, LeadsForm, ProductVariantSelector, BuyTogether, ImageSlider, newsletter popups, GTM). React throws *"Thestyle` prop expects a mapping … not a string"* and kills the section.asset()Fresh global —src/sections/Fonts/Fonts.tsxusedasset(font.source)(from$fresh/runtime), undefined in TanStack →ReferenceError: asset is not defined.import.meta.resolve(...)— unsupported in the Workers module runner (Searchbar.tsx), crashes dev at load.platformglobal —miniCart/Cart.tsxusedif (platform === "vtex")with theapps/storefront.tsimport commented out →ReferenceError: platform is not defined.ctx.get({ __resolveType: "resolvables" })— deco-cx runtime API with no@decocms/blocksequivalent (ProductShelf.tsx) →Cannot read properties of undefined (reading 'get').ctx.response— not present on the new FnContext (sections/Theme/Fonts.tsx) → SSR crash.useComponent/sections/Component— HTMX dynamic-section helper deleted, still imported (Searchbar,Suggestions) → unresolved module.ImageWidgetinSearchResult.tsx) — passes esbuild, fails babel-react-compiler.${}closing brace was moved into the first branch (\... ${a ? "x"} : "y"`) inFilters.tsx,Aside.tsx,Slide.tsx,PriceFiltersIsland.tsx` → syntax errors.@themereset--color-*: initialbut the site's custom colors (perola,perola+,perola-intermediario, …) from the oldtailwind.config.tswere never ported →@applyfails: "Cannot apply unknown utility class".Fonts.tsxhad"/styles.css?revision=${await ""}"(invalid) emitted by the migration.MIGRATION_REPORT.md(hx-* attributes across search filters, ProductGallery, ProductVariantSelector, etc.) still need React conversion.keywarnings — ~100Each child in a list should have a unique "key"warnings (Slider/ShelfCollection/…), pre-existing but noisy.Ask
Extend the blocks-cli transforms to convert (or explicitly flag in the report) items 1–6, 8–11; and keep the HTMX (7, 12) items in the manual-review list (already partially done). Even a
deco-post-cleanuprule for stringstyle→ object andasset()/import.meta.resolve/platformremoval would prevent every migrated site from hitting these.