Files
deflock/webapp
Daniel McGee cb5a531391 Fix CLaude Hallucinations on how to re-create theming,
Accept cart/modal theme-refresh limitation per BuyButton.js docs (Option A)

Looked up the actual Shopify BuyButton.js source and docs instead of
guessing at API surface. Confirmed there is no documented destroy() or
updateConfig() method — createComponent(type, config) is the only
supported way to create or change what's rendered, and it auto-creates a
separate cart + "cart toggle" component tied to that call, not a child of
the node you pass in.

- Revert to plain clear-and-recreate (container.innerHTML + createComponent)
  for both collection switches and theme toggles — the only pattern the
  SDK actually documents
- Remove all destroy()/updateConfig()/ui.components calls added in prior
  revisions; they relied on unverified internal APIs and were producing
  empty renders more often than not
- Keep the cached client (getShopifyUI(), built once) to avoid re-risking
  the "empty cart on page load" issue on every toggle
- Keep the shopifyRenderToken guard against overlapping async renders
- Document the accepted limitation in code: product grid re-themes live
  on every toggle; cart drawer and product modal pick up a new theme on
  next page load only, since there's no documented way to re-theme those
  singletons without a full reload

Files changed:
  src/pages/StorePage.vue
2026-07-01 22:44:30 -04:00
..
2026-04-26 22:13:16 -06:00
2024-09-30 17:33:30 -05:00
2026-02-02 12:50:56 -07:00
2026-04-21 12:16:18 -06:00
2026-04-21 12:16:18 -06:00
2024-09-30 17:33:30 -05:00
2025-12-04 19:41:24 -07:00
2025-12-04 19:41:24 -07:00
2025-12-04 19:41:24 -07:00

deflock

This template should help get you started developing with Vue 3 in Vite.

VSCode + Volar (and disable Vetur).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need Volar to make the TypeScript language service aware of .vue types.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build