@shopbite-de/storefront 1.23.2 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/.env.example +19 -0
  2. package/.github/workflows/build.yaml +1 -1
  3. package/.github/workflows/ci.yaml +6 -3
  4. package/.nuxtrc +1 -1
  5. package/CLAUDE.md +41 -3
  6. package/README.md +139 -40
  7. package/api-gen.config.json +9 -0
  8. package/api-types/storeApiSchema.shopbite.overrides.json +35 -0
  9. package/api-types/storeApiTypes.d.ts +95 -81
  10. package/app/app.vue +37 -53
  11. package/app/assets/css/main.css +20 -4
  12. package/app/components/Address/Fields.vue +2 -21
  13. package/app/components/AnimatedSection.vue +9 -4
  14. package/app/components/BottomNavi.vue +9 -2
  15. package/app/components/Cart/Item.vue +21 -10
  16. package/app/components/Category/Breadcrumb.vue +11 -12
  17. package/app/components/Category/Header.vue +9 -3
  18. package/app/components/Category/Listing.vue +51 -42
  19. package/app/components/Checkout/PaymentAndDelivery.vue +19 -3
  20. package/app/components/Checkout/Summary.vue +65 -1
  21. package/app/components/Cta.vue +4 -2
  22. package/app/components/Food/MarqueeItem.vue +20 -8
  23. package/app/components/Footer/Contact.vue +78 -0
  24. package/app/components/Footer/StoreStatus.vue +30 -0
  25. package/app/components/Footer.vue +2 -1
  26. package/app/components/Header/Body.vue +1 -1
  27. package/app/components/Header/Right.vue +27 -13
  28. package/app/components/Header/Title.vue +1 -0
  29. package/app/components/Header.vue +5 -15
  30. package/app/components/Hero.vue +45 -2
  31. package/app/components/ImageGallery.vue +11 -5
  32. package/app/components/Product/Card.vue +9 -3
  33. package/app/components/Product/CardFooter.vue +22 -12
  34. package/app/components/User/RegistrationForm.vue +0 -1
  35. package/app/components/Wishlist.vue +2 -15
  36. package/app/composables/useAddToCart.ts +13 -13
  37. package/app/composables/useAddressAutocomplete.ts +12 -19
  38. package/app/composables/useAddressSuggestionArea.ts +16 -0
  39. package/app/composables/useAddressValidation.ts +3 -19
  40. package/app/composables/useCartMutations.ts +168 -0
  41. package/app/composables/{useCategory.ts → useCategoryById.ts} +1 -1
  42. package/app/composables/useCategorySeo.ts +22 -25
  43. package/app/composables/useCheckoutMethodGuard.ts +201 -0
  44. package/app/composables/useMatomo.ts +25 -0
  45. package/app/composables/useMatomoConfig.ts +12 -0
  46. package/app/composables/useMenuSectionSchema.ts +55 -0
  47. package/app/composables/useNavigation.ts +12 -9
  48. package/app/composables/usePageSeo.ts +50 -0
  49. package/app/composables/useRestaurantSchema.ts +64 -0
  50. package/app/composables/useScrollAnimation.ts +39 -8
  51. package/app/composables/useSearchTracking.ts +33 -0
  52. package/app/composables/useSeoUrlRoute.ts +58 -0
  53. package/app/composables/useSortingSelection.ts +28 -0
  54. package/app/composables/useStoreStatus.ts +48 -0
  55. package/app/composables/useTrackEvent.ts +29 -23
  56. package/app/pages/[...all].vue +4 -4
  57. package/app/pages/account/recover/password/index.vue +1 -0
  58. package/app/pages/anmelden.vue +4 -0
  59. package/app/pages/bestellung/[id]/erfolg.vue +1 -5
  60. package/app/pages/bestellung/[id]/fehler.vue +2 -2
  61. package/app/pages/bestellung/[id]/index.vue +10 -4
  62. package/app/pages/bestellung/bestaetigen.vue +1 -5
  63. package/app/pages/bestellung/warenkorb.vue +1 -5
  64. package/app/pages/bestellung/zahlung-versand.vue +1 -5
  65. package/app/pages/c/[...all].vue +2 -35
  66. package/app/pages/index.vue +25 -13
  67. package/app/pages/kontakt.vue +4 -0
  68. package/app/pages/konto/adressen.vue +4 -0
  69. package/app/pages/konto/bestellung/[id].vue +4 -0
  70. package/app/pages/konto/bestellungen.vue +4 -0
  71. package/app/pages/konto/index.vue +4 -0
  72. package/app/pages/konto/profil.vue +4 -0
  73. package/app/pages/maintenance.vue +6 -0
  74. package/app/pages/merkliste.vue +1 -7
  75. package/app/pages/passwort-vergessen.vue +1 -0
  76. package/app/pages/registrierung/bestaetigen.vue +4 -0
  77. package/app/pages/registrierung/index.vue +4 -0
  78. package/app/pages/speisekarte/[...all].vue +2 -36
  79. package/app/pages/suche.vue +24 -21
  80. package/app/plugins/matomo.ts +35 -0
  81. package/app/utils/hydrateWhenVisible.ts +20 -0
  82. package/app/utils/media.ts +33 -0
  83. package/app/utils/openingHours.ts +67 -0
  84. package/app/utils/schema.ts +235 -0
  85. package/app/utils/seo.ts +56 -0
  86. package/app/utils/seoPath.ts +57 -0
  87. package/content/index.yml +10 -9
  88. package/content.config.ts +3 -0
  89. package/docs/notes/2026-07-05-issue-259-matomo-broken.md +14 -0
  90. package/docs/notes/2026-09-07-dependency-update.md +113 -0
  91. package/docs/notes/2026-09-08-issue-240-shipping-method-blocked.md +83 -0
  92. package/docs/notes/2026-09-08-issue-241-cart-lock-conflicts.md +63 -0
  93. package/docs/notes/2026-09-08-issue-244-category-url-trailing-slash.md +65 -0
  94. package/docs/notes/2026-09-08-issue-276-payment-method-blocked.md +39 -0
  95. package/docs/notes/2026-09-08-issue-277-typecheck.md +99 -0
  96. package/docs/notes/2026-09-10-issue-250-animated-section.md +23 -0
  97. package/docs/notes/2026-09-10-issue-251-shop-data-in-base-layer.md +30 -0
  98. package/docs/notes/2026-09-10-issue-272-restaurant-schema.md +27 -0
  99. package/docs/notes/2026-09-10-issue-273-performance-media.md +64 -0
  100. package/docs/notes/2026-09-10-issue-274-seo-basics.md +49 -0
  101. package/docs/notes/2026-09-10-issue-275-accessibility.md +46 -0
  102. package/docs/notes/2026-09-10-issue-290-footer-nap.md +28 -0
  103. package/docs/notes/2026-09-10-issue-291-seo-url-trailing-slash.md +24 -0
  104. package/docs/notes/2026-09-10-issue-294-matomo-without-config.md +33 -0
  105. package/docs/notes/2026-09-10-issue-295-search-hydration-mismatch.md +25 -0
  106. package/docs/notes/2026-09-10-issue-296-track-direct-search.md +19 -0
  107. package/docs/notes/2026-09-10-issue-312-store-api-criteria-post.md +64 -0
  108. package/docs/notes/2026-09-10-issue-313-wishlist-scoped-tailwind.md +29 -0
  109. package/docs/notes/2026-09-10-issue-314-mobile-js-cost.md +119 -0
  110. package/node.dockerfile +5 -2
  111. package/nuxt.config.ts +74 -15
  112. package/package.json +45 -42
  113. package/patches/@shopware__nuxt-module@1.5.1.patch +32 -0
  114. package/pnpm-workspace.yaml +2 -0
  115. package/public/hero-poster.webp +0 -0
  116. package/server/api/__sitemap__/urls.get.ts +49 -0
  117. package/server/api/category/[categoryId].get.ts +20 -9
  118. package/server/api/content/home.get.ts +14 -0
  119. package/server/api/content/page.get.ts +22 -0
  120. package/server/api/listing/[categoryId].get.ts +12 -18
  121. package/server/api/product/[productId]/cross-selling.get.ts +3 -9
  122. package/server/api/product/[productId].get.ts +4 -8
  123. package/server/plugins/site-url.ts +13 -0
  124. package/server/plugins/sitemap-trailing-slash.ts +26 -0
  125. package/server/utils/sitemap.ts +60 -0
  126. package/server/utils/storeApi.ts +34 -0
  127. package/shopware.d.ts +35 -11
  128. package/test/nuxt/AddressFields.test.ts +2 -73
  129. package/test/nuxt/AnimatedSection.test.ts +67 -0
  130. package/test/nuxt/CartItem.test.ts +95 -0
  131. package/test/nuxt/FooterContact.test.ts +102 -0
  132. package/test/nuxt/FooterStoreStatus.test.ts +48 -0
  133. package/test/nuxt/HeaderRight.test.ts +14 -10
  134. package/test/nuxt/Hero.test.ts +68 -0
  135. package/test/nuxt/PaymentAndDelivery.test.ts +67 -8
  136. package/test/nuxt/RegistrationForm.test.ts +20 -6
  137. package/test/nuxt/useAddToCart.test.ts +34 -1
  138. package/test/nuxt/useAddressAutocomplete.test.ts +2 -38
  139. package/test/nuxt/useAddressSuggestionArea.test.ts +27 -0
  140. package/test/nuxt/useBusinessHours.test.ts +1 -1
  141. package/test/nuxt/useCartMutations.test.ts +225 -0
  142. package/test/nuxt/useCategoryListing.test.ts +5 -3
  143. package/test/nuxt/useCheckoutMethodGuard.test.ts +386 -0
  144. package/test/nuxt/useProductConfigurator.test.ts +4 -1
  145. package/test/nuxt/useScrollAnimation.test.ts +55 -49
  146. package/test/nuxt/useSearchTracking.test.ts +71 -0
  147. package/test/nuxt/useSeoUrlRoute.test.ts +93 -0
  148. package/test/nuxt/useStoreStatus.test.ts +77 -0
  149. package/test/nuxt/useTrackEvent.test.ts +112 -0
  150. package/test/unit/media.spec.ts +49 -0
  151. package/test/unit/openingHours.spec.ts +59 -0
  152. package/test/unit/schema.spec.ts +243 -0
  153. package/test/unit/seo.spec.ts +107 -0
  154. package/test/unit/seoPath.spec.ts +116 -0
  155. package/test/unit/sitemap.spec.ts +88 -0
  156. package/test/unit/useCategorySeo.spec.ts +40 -30
  157. package/test/unit/useSortingSelection.spec.ts +39 -0
  158. package/tsconfig.json +1 -1
  159. package/app/composables/useValidCitiesForDelivery.ts +0 -12
@@ -0,0 +1,25 @@
1
+ # Issue #295: Hydration mismatch on direct load of `/suche`
2
+
3
+ As of 2026-09-10, branch `fix/295-search-hydration-mismatch`.
4
+
5
+ ## Cause
6
+
7
+ Vue (dev server) named the element:
8
+
9
+ ```
10
+ Hydration text mismatch in <SelectValue>
11
+ - rendered on server: "Sortieren"
12
+ - expected on client: "Top results"
13
+ ```
14
+
15
+ `suche.vue` snapshotted the sorting select at setup: `ref(currentSortingOrder.value ?? "Sortieren")`. On the server the listing (`useLazyAsyncData`) resolves after setup and watchers do not run during SSR, so the server rendered the placeholder. The client hydrates with the payload present and rendered the actual sorting. Same defect as #239, which was fixed in `Category/Listing.vue` only.
16
+
17
+ ## Solution
18
+
19
+ - `app/composables/useSortingSelection.ts` holds the pattern from #239 once: `currentSorting` is a writable computed that follows the listing data and keeps the user's choice as an override; setting the placeholder clears the override. Exported `SORTING_PLACEHOLDER`.
20
+ - `suche.vue` and `Category/Listing.vue` use it. In `suche.vue` a new search term also resets the override (as #249 did for filters), because `applySearch` sends no order and the response falls back to the default sorting.
21
+ - Unit test `test/unit/useSortingSelection.spec.ts` covers the setup-before-data case.
22
+
23
+ ## Verification
24
+
25
+ Dev server against the demo Shopware, Playwright collecting Vue hydration warnings: before the fix `/suche?q=pizza` reported the mismatch above; after it `/suche?q=pizza`, `/suche?q=salat` and `/speisekarte/pizza/` report none. Changing the sorting on `/suche` still triggers a search request with `order` and updates the select. Production build checks in the PR.
@@ -0,0 +1,19 @@
1
+ # Issue #296: Search not tracked on direct load of `/suche`
2
+
3
+ As of 2026-09-10, branch `fix/296-track-direct-search`.
4
+
5
+ ## Cause
6
+
7
+ `useListingSearch` fetches the results during SSR via `useLazyAsyncData`; they end up in the payload. On a direct load the client hydrates with them, `elements` never changes, and the `watch(elements, …)` in `suche.vue` (not `immediate`) never fires. Only a search that re-fetches on the client (query change, sorting) triggered `trackSiteSearch`. Verified on a production build: direct load of `/suche?q=pizza` → `_paq` only had `trackPageView`.
8
+
9
+ ## Solution
10
+
11
+ `app/composables/useSearchTracking.ts` replaces the inline watcher:
12
+
13
+ - Watches `[elements, showSkeleton]` with `immediate: import.meta.client`, so results already present at setup are tracked as well. On the server the watcher does not fire.
14
+ - Tracks once per search term (`lastTrackedTerm`). A sorting change re-fetches the same term and is no longer reported again (previously it produced a second `trackSiteSearch`).
15
+ - Client-side navigation: the skeleton is shown until the fetch completes, so the empty initial `elements` are not tracked.
16
+
17
+ ## Verification
18
+
19
+ Production build against the La Fattoria Store API with Matomo configured: direct load of `/suche?q=pizza` pushes exactly one `trackSiteSearch`; a client-side search from `/c/Pizza/` to `/suche?q=salat` still pushes one.
@@ -0,0 +1,64 @@
1
+ # Issue #312: Store API criteria as POST body
2
+
3
+ As of 2026-09-10, branch `fix/312-store-api-criteria-post`.
4
+
5
+ ## Cause
6
+
7
+ The server routes for listing, category, product and cross-selling sent their
8
+ criteria as `_criteria` query parameters (`encodeForQuery` from
9
+ `@shopware/api-client/helpers`), and `useNavigation` used the
10
+ `readNavigationGet` operation the same way. Shopware applies `associations`
11
+ and `limit` from the query string, but not the `includes` projection: every
12
+ entity came back with all of its fields. Measured on the La Fattoria Store
13
+ API (category "Pizza", 100 products): the listing route returned 285 KB with
14
+ 92 fields per product; the same criteria as a POST body returns 147 KB with
15
+ the 11 requested fields. `/api/category/<id>` returned 40 fields incl.
16
+ `cmsPage`, `children` and `translations` although the route asked for five.
17
+ The category page shipped 546 KB of HTML (393 KB Nuxt payload).
18
+
19
+ ## Solution
20
+
21
+ - `server/utils/storeApi.ts`: `storeApiPost(path, body, { headers })` for
22
+ the Store API, plus `MEDIA_INCLUDES` (`media`, `media_thumbnail`,
23
+ `product_media`) so category and product images keep the URL, thumbnails
24
+ and intrinsic size that `mediaSrcSet`/`mediaSize` need (#273).
25
+ - Listing, category, product and cross-selling routes send their criteria as
26
+ the POST body; the category route lists the fields the header,
27
+ `useCategorySeo` and the menu-section schema read (`media`, `description`,
28
+ `metaTitle`, `metaDescription`, `active`, `type`, …), which used to arrive
29
+ only because the projection was ignored.
30
+ - `useNavigation` uses `readNavigation post /navigation/{activeId}/{rootId}`
31
+ with the criteria as body (plus `id` in the includes).
32
+ - Cache keys of the `defineCachedEventHandler`s are unchanged.
33
+ - `useNavigationSearch` (project copy of the layer composable, older) still
34
+ sends `_criteria` on GET for the SEO URL lookup; it uses no `includes`, so
35
+ nothing to gain there.
36
+
37
+ ## Verification
38
+
39
+ Production build against the La Fattoria Store API (category "Pizza", 100
40
+ products), uncompressed sizes:
41
+
42
+ | Response | Before | After |
43
+ | ------------------------- | ------ | ------------------------- |
44
+ | `/api/listing/<id>` | 285 KB | 147 KB (11 fields/product) |
45
+ | `/api/category/<id>` | 40 fields | 13 fields, 1 KB |
46
+ | `/` HTML (Nuxt payload) | 163 KB | 111 KB (32 KB) |
47
+ | `/c/Pizza/` HTML (payload) | 546 KB (393 KB) | 314 KB (134 KB) |
48
+
49
+ Category media keeps `url`, `thumbnails` (400/800/1920) and `metaData`.
50
+ Playwright category navigation (SSR, client link navigation, redirect,
51
+ back) shows the same product counts and no hydration warnings. Lighthouse
52
+ mobile on `/c/Pizza/` is unchanged on the CPU side (TBT 600 ms, main
53
+ thread 3.9 s): the gain is transfer size only; script cost is #314.
54
+
55
+ The product cover projection could not be checked on La Fattoria: 39 of
56
+ 100 products carry a `coverId`, but none of them resolves to a `cover`,
57
+ with or without `includes` (the media rows are gone; a data problem of that
58
+ instance, unrelated to this change). Verified against Shopware's public
59
+ demo Store API instead: the product route's criteria return 17 product
60
+ fields with `cover.media.{url,alt,thumbnails,metaData}`, and the listing
61
+ criteria return the 11 product fields with the same media shape. Option
62
+ images only read `media.url`, which `MEDIA_INCLUDES` keeps.
63
+
64
+ 235 unit tests, Prettier, ESLint, typecheck and build pass.
@@ -0,0 +1,29 @@
1
+ # Issue #313: Wishlist.vue re-imported Tailwind and Nuxt UI
2
+
3
+ As of 2026-09-10, branch `fix/313-wishlist-scoped-tailwind`.
4
+
5
+ ## Cause
6
+
7
+ `app/components/Wishlist.vue` ended with a `<style scoped>` block that
8
+ started with `@import "tailwindcss"` and `@import "@nuxt/ui"` to make two
9
+ `@apply` rules for `h1`/`h2` resolve. Tailwind v4 emits the complete base
10
+ and the Nuxt UI theme into that scoped stylesheet, so the build shipped a
11
+ second `merkliste.*.css` of 288 KB (32 KB gzipped) next to the global
12
+ `entry.css` (253 KB). The component renders no `h1`/`h2`; the rules
13
+ matched nothing.
14
+
15
+ ## Solution
16
+
17
+ Remove the `<style>` block. No other component imports Tailwind inside a
18
+ `<style>` (`Contact/Form.vue` has a plain scoped rule). If a component
19
+ needs `@apply` in the future, use `@reference "tailwindcss"` (Tailwind v4)
20
+ instead of `@import`; it resolves utilities without re-emitting the base.
21
+
22
+ ## Verification
23
+
24
+ - Production build: the `merkliste.*.css` chunk is gone; the remaining
25
+ chunks are `entry.css` (253 KB) and `kontakt.css` (117 B).
26
+ - `/merkliste` on the production build against the La Fattoria Store API
27
+ loads only `entry.css` (25 KB gzipped), renders the empty-wishlist state
28
+ as before, no console errors.
29
+ - Prettier and ESLint pass.
@@ -0,0 +1,119 @@
1
+ # Issue #314: Mobile JavaScript cost
2
+
3
+ As of 2026-09-10, branch `fix/314-mobile-js-cost`.
4
+
5
+ ## Measurement setup
6
+
7
+ Production build, La Fattoria Store API, Lighthouse 12.8.2 mobile
8
+ (simulated throttling, 4× CPU) behind the h2/gzip proxy from
9
+ `docs/notes/2026-09-10-issue-273-performance-media.md`; two runs per page,
10
+ same machine. Chunk attribution comes from the client manifest that Nuxt
11
+ inlines into `.output/server/chunks/virtual/precomputed.mjs` (the preload
12
+ set of the entry is what the head lists as `modulepreload`).
13
+
14
+ ## Findings on the baseline (main)
15
+
16
+ - The entry preloads 102 scripts (302 KB gzipped); 54 of them are below
17
+ 1 KB (reka-ui and Nuxt UI internals shared by several pages).
18
+ - `SalesChannelSwitch` was rendered on every page although the feature is
19
+ off by default: it pulled `USelectMenu` (Combobox virtualizer, 25 KB
20
+ gzipped) into the entry and fired a `/shopbite/multi-channel-group`
21
+ request per page.
22
+ - `useMatomo` (the @nuxt/scripts registry composable, 10 KB gzipped) sat in
23
+ the entry through `useTrackEvent`, also for shops without Matomo.
24
+ - `Header.vue` rendered a login `USlideover` that nothing opened.
25
+ - `NuxtLink` prefetched the chunks of every link in view: ~20 chunks and a
26
+ page stylesheet (72 KB) during the initial load of the home page.
27
+ - On the category page the cart drawer, the mobile filter drawer (both
28
+ vaul) and one `UCollapsible` per card were mounted with the page; the
29
+ drawer chunk and the collapsible chunk each cost ~400 ms of scripting
30
+ (mostly forced layout on a 1,200-element page).
31
+ - Client-side navigation to a content page (`/agb`) or back to `/` loads
32
+ the SQLite WASM build (865 KB) plus the collection dump, because
33
+ `queryCollection()` in the browser prefers WASM whenever
34
+ `window.WebAssembly` exists.
35
+ - `Style & Layout` (~1.1 s on the home page, 313 DOM elements) is the
36
+ first render of the 253 KB stylesheet; not JavaScript, not part of this
37
+ issue.
38
+ - Sentry ships no client code (no `sentry.client.config.ts`).
39
+
40
+ ## Changes
41
+
42
+ 1. `LazySalesChannelSwitch v-if="multiChannel"` in `Header.vue` and
43
+ `Header/Body.vue`; the dead login slideover is removed.
44
+ 2. `plugins/matomo.ts` imports `useMatomo` after `onNuxtReady`;
45
+ `useTrackEvent` pushes to Matomo's `_paq` queue directly (matomo.js
46
+ replays it), gated by the new `useMatomoConfig()`.
47
+ 3. `hydrateWhenVisible()` (`app/utils`): keeps the server-rendered markup of
48
+ a component and hydrates it when it comes within 600 px of the viewport,
49
+ without turning it into a separate chunk. Used for the product cards in
50
+ `Category/Listing.vue` and `pages/suche.vue` and for the footer in
51
+ `app.vue`. The margin exceeds the reveal margin of `AnimatedSection`
52
+ (100 px), so the scroll animation still runs.
53
+ 4. Cart drawer (`Header/Right.vue`), mobile filter drawer
54
+ (`Category/Listing.vue`) and the product options collapsible
55
+ (`Product/CardFooter.vue`) are created on first use (`v-if` + `nextTick`
56
+ before opening); the `ClientOnly` wrappers they needed are gone.
57
+ 5. `experimental.defaults.nuxtLink.prefetchOn = { visibility: false,
58
+ interaction: true }`: route chunks load on hover/touch.
59
+ 6. `server/api/content/home.get.ts` and `page.get.ts` run the content
60
+ queries on the server (`@nuxt/content/server`); `pages/index.vue` and
61
+ `pages/[...all].vue` fetch them.
62
+ 7. Rolldown `codeSplitting.groups` (`nuxt.config.ts`, `vite.build`):
63
+ framework and UI modules shared by at least two chunks form two chunks
64
+ instead of ~60 tiny ones.
65
+
66
+ ## Results (Lighthouse mobile, two runs each)
67
+
68
+ | Page | Metric | Baseline | After |
69
+ | --- | --- | --- | --- |
70
+ | `/` | TBT | 330–400 ms | 150–170 ms |
71
+ | `/` | Script evaluation | 705–811 ms | 600–630 ms |
72
+ | `/` | Script requests (transfer) | 135 (394 KB) | 34–35 (335 KB) |
73
+ | `/` | Main thread | 2.5–2.6 s | 2.1–2.2 s |
74
+ | `/c/Pizza/` | TBT | 570–590 ms | 300–340 ms |
75
+ | `/c/Pizza/` | Script evaluation | 1.5–1.6 s | 1.1–1.2 s |
76
+ | `/c/Pizza/` | Script requests (transfer) | 133 (394 KB) | 35 (321 KB) |
77
+ | `/c/Pizza/` | Main thread | 4.0 s | 2.9–3.1 s |
78
+
79
+ Three runs of the final build (two of the chunk-group step, one of the
80
+ final commit); the category numbers are for the 29-product "Pizza"
81
+ category, the 100-product case scales with the same mechanism (cards
82
+ hydrate on scroll).
83
+
84
+ Intermediate steps: changes 1–3 brought the home page to TBT 280–290 ms
85
+ / 650–680 ms script evaluation and the category page to 420–440 ms /
86
+ 1.25–1.3 s; changes 4–5 to 190–260 ms / 570–600 ms and 390–480 ms /
87
+ 1.14–1.2 s; the chunk groups (7) cut the requests from 116 to 34 and
88
+ took TBT to 170 ms / 340 ms. The entry's preload set went from 102
89
+ scripts (302 KB gzipped) to 25 (301 KB): the shared `ui` chunk carries
90
+ UI code that not every page needs, but the bytes are the same and the
91
+ module overhead is gone.
92
+
93
+ FCP (3.0–3.3 s) and LCP are unchanged: they are the local headless
94
+ first-paint artefact described in the #273 note and the stylesheet
95
+ (`Style & Layout` ~1 s on 311 DOM elements), not JavaScript.
96
+
97
+ ## Not done
98
+
99
+ - `Style & Layout` ~1 s on every page comes from the 253 KB Tailwind /
100
+ Nuxt UI stylesheet; a CSS topic of its own.
101
+ - `UHeader` imports `UModal`, `UDrawer` and `USlideover` statically
102
+ (Nuxt UI), so vaul stays in the entry even though the drawers are
103
+ created on demand.
104
+ - The wishlist button on the product card has only a tooltip, no
105
+ `aria-label` (noticed while writing the checks).
106
+ - `nuxt-vitalizer`'s `disablePreloadLinks` was not tried: with 25
107
+ preloads left, the trade (a later start per chunk) has little to gain.
108
+
109
+ ## Verification
110
+
111
+ - Playwright (mobile viewport): first and middle product card open their
112
+ options after scrolling, the wishlist button of the last card updates the
113
+ header count, the filter drawer and the cart drawer open, the footer's
114
+ colour mode button works, no console errors; client-side navigation to
115
+ `/agb` and back to `/` no longer requests the WASM build or a SQL dump.
116
+ - Matomo with `NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_*` set: the registry
117
+ chunk loads after `onNuxtReady`, `matomo.js` is requested and `_paq`
118
+ holds the page view.
119
+ - Unit tests, Prettier, ESLint, typecheck and build pass.
package/node.dockerfile CHANGED
@@ -14,8 +14,11 @@ WORKDIR /app
14
14
 
15
15
  RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} --activate
16
16
 
17
- # Copy manifests first so dependency layer is cached independently from source changes
18
- COPY package.json pnpm-lock.yaml .npmrc ./
17
+ # Copy manifests first so dependency layer is cached independently from source changes.
18
+ # pnpm-workspace.yaml (allowBuilds, patchedDependencies) and patches/ are part of the
19
+ # lockfile contract; without them `--frozen-lockfile` fails.
20
+ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
21
+ COPY patches ./patches
19
22
  RUN pnpm install --frozen-lockfile --prefer-offline
20
23
 
21
24
  COPY . .
package/nuxt.config.ts CHANGED
@@ -20,7 +20,7 @@ export default defineNuxtConfig({
20
20
  },
21
21
  {
22
22
  property: "og:title",
23
- content: storeDescription,
23
+ content: storeName,
24
24
  },
25
25
  {
26
26
  property: "og:description",
@@ -40,6 +40,14 @@ export default defineNuxtConfig({
40
40
  "/account/recover/password",
41
41
  ],
42
42
  },
43
+ sitemap: {
44
+ // File-based pages and route rules (ssr/swr/redirect) are checkout and
45
+ // account flows; indexable URLs come from the home page, content pages
46
+ // and the Store API source.
47
+ excludeAppSources: ["nuxt:pages", "nuxt:route-rules"],
48
+ urls: ["/"],
49
+ sources: ["/api/__sitemap__/urls"],
50
+ },
43
51
 
44
52
  runtimeConfig: {
45
53
  shopware: {
@@ -60,6 +68,11 @@ export default defineNuxtConfig({
60
68
  },
61
69
  menuCategoryId: "",
62
70
  searchFallbackCategoryId: "",
71
+ // Optional Geoapify bounding box "lon1,lat1,lon2,lat2" that narrows
72
+ // the address suggestions in the checkout (empty = no filter, #251).
73
+ addressAutocomplete: {
74
+ boundingBox: "",
75
+ },
63
76
  feature: {
64
77
  multiChannel: false,
65
78
  secureKey: "",
@@ -70,12 +83,31 @@ export default defineNuxtConfig({
70
83
  name: storeName,
71
84
  description: storeDescription,
72
85
  countryId: "",
86
+ // `%s` = page title, `%siteName` = site.name; the home page renders
87
+ // its title without the template.
88
+ titleTemplate: "%s | %siteName – Online bestellen",
89
+ // Share preview for pages without their own image (path or URL).
90
+ ogImage: "/card.png",
91
+ // Used in the default home page title and description.
92
+ cuisine: "",
93
+ // Shown in the footer (NAP for local SEO, #290) and in the Restaurant
94
+ // schema (#272); empty values are left out.
95
+ address: {
96
+ street: "",
97
+ postalCode: "",
98
+ city: "",
99
+ country: "DE",
100
+ },
101
+ telephone: "",
102
+ googleBusinessProfileUrl: "",
103
+ // Restaurant schema only, e.g. "€€" (#272).
104
+ priceRange: "",
73
105
  },
74
106
  storeUrl: "",
75
- // Matomo config for the @nuxt/scripts registry. Declared here (not as
76
- // registry options) so the values stay runtime-overridable via
77
- // NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_* env vars: registry options are
78
- // inlined into the build and would shadow the runtime config (#259).
107
+ // Matomo config, runtime-overridable via NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_*
108
+ // env vars. Never set these as registry options: those are inlined into
109
+ // the build and shadow the runtime config (#259). Matomo only loads when
110
+ // both values are set (app/plugins/matomo.ts, #294).
79
111
  scripts: {
80
112
  matomoAnalytics: {
81
113
  matomoUrl: "",
@@ -109,6 +141,8 @@ export default defineNuxtConfig({
109
141
  modules: [
110
142
  "@shopware/nuxt-module",
111
143
  "@nuxt/image",
144
+ // must be loaded before @nuxt/content for the content integration
145
+ "@nuxtjs/sitemap",
112
146
  "@nuxt/content",
113
147
  "@nuxtjs/robots",
114
148
  "@vite-pwa/nuxt",
@@ -206,6 +240,32 @@ export default defineNuxtConfig({
206
240
  compatibilityDate: "2025-07-15",
207
241
 
208
242
  vite: {
243
+ build: {
244
+ // Vite 8 bundles with Rolldown; `rollupOptions` would drop this key.
245
+ rolldownOptions: {
246
+ output: {
247
+ // Rolldown code splitting: the framework and UI libraries used by
248
+ // more than one chunk go into two shared chunks instead of ~60
249
+ // tiny ones, which halves the module preloads of every page (#314).
250
+ codeSplitting: {
251
+ groups: [
252
+ {
253
+ name: "framework",
254
+ test: /node_modules\/(\.pnpm\/)?(vue|@vue\+|@vue\/|vue-router|unhead|@unhead|nuxt@|hookable|ofetch|ufo|defu|h3|devalue|klona|destr|cookie-es|radix3|rou3|unctx|pinia)[@/]/,
255
+ minShareCount: 2,
256
+ priority: 20,
257
+ },
258
+ {
259
+ name: "ui",
260
+ test: /node_modules\/(\.pnpm\/)?(reka-ui|@nuxt\+ui|@nuxt\/ui|tailwind-variants|tailwind-merge|@floating-ui|@vueuse|vaul-vue|@internationalized|@tanstack|@nuxt\+icon|@nuxt\/icon|@iconify)[@/]/,
261
+ minShareCount: 2,
262
+ priority: 10,
263
+ },
264
+ ],
265
+ },
266
+ },
267
+ },
268
+ },
209
269
  optimizeDeps: {
210
270
  include: [
211
271
  "@vue/devtools-core",
@@ -224,11 +284,20 @@ export default defineNuxtConfig({
224
284
  asyncContext: true,
225
285
  payloadExtraction: true,
226
286
  watcher: "parcel",
287
+ defaults: {
288
+ nuxtLink: {
289
+ // Prefetch route chunks on hover/touch instead of for every link in
290
+ // view: the header alone pulled ~20 chunks and a page stylesheet
291
+ // during the initial load (#314).
292
+ prefetchOn: { visibility: false, interaction: true },
293
+ },
294
+ },
227
295
  },
228
296
  $development: {
229
297
  modules: [
230
298
  "@shopware/nuxt-module",
231
299
  "@nuxt/image",
300
+ "@nuxtjs/sitemap",
232
301
  "@nuxt/content",
233
302
  "@nuxtjs/robots",
234
303
  "@nuxt/ui",
@@ -238,14 +307,4 @@ export default defineNuxtConfig({
238
307
  "@nuxt/hints",
239
308
  ],
240
309
  },
241
- $production: {
242
- scripts: {
243
- registry: {
244
- // `true` enables the script without inlining option values into the
245
- // build; the actual config comes from runtimeConfig.public.scripts
246
- // above (env-overridable at runtime, see #259).
247
- matomoAnalytics: true,
248
- },
249
- },
250
- },
251
310
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopbite-de/storefront",
3
- "version": "1.23.2",
3
+ "version": "1.24.0",
4
4
  "main": "nuxt.config.ts",
5
5
  "description": "Shopware storefront for food delivery shops",
6
6
  "keywords": [
@@ -20,55 +20,58 @@
20
20
  "dependencies": {
21
21
  "@headlessui/vue": "^1.7.23",
22
22
  "@heroicons/vue": "^2.2.0",
23
- "@iconify-json/lucide": "^1.2.116",
24
- "@iconify-json/simple-icons": "^1.2.88",
25
- "@nuxt/content": "3.12.0",
26
- "@nuxt/image": "^2.0.0",
27
- "@nuxt/scripts": "0.13.4",
28
- "@nuxt/ui": "^4.9.0",
29
- "@nuxtjs/robots": "^6.1.2",
30
- "@pinia/nuxt": "0.11.3",
31
- "@sentry/nuxt": "^10.63.0",
32
- "@shopware/api-client": "^1.5.0",
33
- "@shopware/api-gen": "^1.5.0",
34
- "@shopware/composables": "^1.12.0",
35
- "@shopware/helpers": "^1.7.1",
36
- "@shopware/nuxt-module": "^1.5.0",
37
- "@unhead/vue": "^2.1.15",
23
+ "@iconify-json/lucide": "^1.2.130",
24
+ "@iconify-json/simple-icons": "^1.2.95",
25
+ "@nuxt/content": "3.16.0",
26
+ "@nuxt/image": "^2.1.0",
27
+ "@nuxt/scripts": "1.3.9",
28
+ "@nuxt/ui": "^4.11.1",
29
+ "@nuxtjs/robots": "^6.2.0",
30
+ "@nuxtjs/sitemap": "^8.5.0",
31
+ "@pinia/nuxt": "1.0.2",
32
+ "@sentry/nuxt": "^10.73.0",
33
+ "@shopware/api-client": "^1.5.1",
34
+ "@shopware/api-gen": "^1.5.1",
35
+ "@shopware/composables": "^1.12.1",
36
+ "@shopware/helpers": "^1.7.2",
37
+ "@shopware/nuxt-module": "^1.5.1",
38
+ "@unhead/vue": "^3.4.0",
38
39
  "@vite-pwa/nuxt": "^1.1.1",
39
- "@vueuse/core": "^14.3.0",
40
+ "@vueuse/core": "^14.4.0",
40
41
  "dotenv": "^17.4.2",
41
42
  "fflate": "^0.8.3",
42
- "nuxt": "^4.4.8",
43
- "nuxt-vitalizer": "2.0.0",
44
- "uuid": "^13.0.2"
43
+ "nuxt": "^4.5.2",
44
+ "nuxt-vitalizer": "3.0.0",
45
+ "uuid": "^14.0.2"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@iconify-json/heroicons": "^1.2.3",
48
- "@iconify-json/hugeicons": "^1.2.30",
49
+ "@iconify-json/hugeicons": "^1.2.34",
49
50
  "@nuxt/devtools-kit": "^3.2.4",
50
- "@nuxt/eslint": "^1.16.0",
51
- "@nuxt/hints": "1.0.3",
52
- "@nuxt/test-utils": "^4.0.3",
53
- "@playwright/test": "^1.61.1",
54
- "@types/node": "^25.9.4",
55
- "@typescript-eslint/eslint-plugin": "^8.62.1",
56
- "@typescript-eslint/parser": "^8.62.1",
57
- "@vitejs/plugin-vue": "^6.0.7",
58
- "@vitest/ui": "4.1.10",
59
- "@vue/compiler-dom": "^3.5.39",
60
- "@vue/server-renderer": "^3.5.39",
61
- "@vue/test-utils": "^2.4.11",
62
- "@vue/typescript-plugin": "^3.3.6",
63
- "eslint": "^10.6.0",
51
+ "@nuxt/eslint": "^1.17.0",
52
+ "@nuxt/hints": "1.1.4",
53
+ "@nuxt/test-utils": "^4.3.2",
54
+ "@playwright/test": "^1.63.0",
55
+ "@types/js-cookie": "^3.0.6",
56
+ "@types/node": "^26.5.0",
57
+ "@typescript-eslint/eslint-plugin": "^8.70.0",
58
+ "@typescript-eslint/parser": "^8.70.0",
59
+ "@vitejs/plugin-vue": "^6.0.8",
60
+ "@vitest/ui": "5.0.0",
61
+ "@vue/compiler-dom": "^3.5.42",
62
+ "@vue/server-renderer": "^3.5.42",
63
+ "@vue/test-utils": "^2.5.0",
64
+ "@vue/typescript-plugin": "^3.3.11",
65
+ "eslint": "^10.10.0",
64
66
  "eslint-config-prettier": "^10.1.8",
65
- "happy-dom": "^20.10.6",
66
- "jsdom": "^29.1.1",
67
- "playwright-core": "^1.61.1",
68
- "prettier": "^3.9.4",
69
- "tailwindcss": "^4.3.2",
67
+ "happy-dom": "^20.14.0",
68
+ "jsdom": "^30.0.1",
69
+ "playwright-core": "^1.63.0",
70
+ "prettier": "^3.9.6",
71
+ "tailwindcss": "^4.3.3",
70
72
  "typescript": "^6.0.3",
71
- "vitest": "^4.1.9"
73
+ "vitest": "^5.0.0",
74
+ "vue-tsc": "3.3.11"
72
75
  },
73
76
  "scripts": {
74
77
  "build": "nuxt build",
@@ -86,6 +89,6 @@
86
89
  "generate-types": "shopware-api-gen generate --apiType=store",
87
90
  "load-schema": "pnpx @shopware/api-gen loadSchema --apiType=store",
88
91
  "lint:fix": "pnpm run prettier:fix && pnpm run eslint:fix",
89
- "typecheck": "pnpx nuxt typecheck --cwd=app"
92
+ "typecheck": "nuxt typecheck"
90
93
  }
91
94
  }
@@ -0,0 +1,32 @@
1
+ diff --git a/plugin.ts b/plugin.ts
2
+ index 5b9cdef440df1eb477ffea4d66180bc65b33835a..c23d08a8af61875b55e192d108d009bc5ddd7b07 100644
3
+ --- a/plugin.ts
4
+ +++ b/plugin.ts
5
+ @@ -14,7 +14,8 @@ import {
6
+ } from "#imports";
7
+ import type { ApiClient } from "#shopware";
8
+
9
+ -import type { ShopwareNuxtOptions } from "./src";
10
+ +import type { ShopwareNuxtOptions } from "./dist/index";
11
+ +import type { Plugin } from "#app";
12
+
13
+ declare module "#app" {
14
+ interface NuxtApp {
15
+ @@ -28,7 +29,10 @@ declare module "vue" {
16
+ }
17
+ }
18
+
19
+ -export default defineNuxtPlugin((NuxtApp) => {
20
+ +// Explicit type keeps Nuxt's generated NuxtApp augmentation from
21
+ +// recursively depending on this plugin's inferred return type.
22
+ +const shopwarePlugin: Plugin<{ shopwareApiClient: ApiClient }> =
23
+ + defineNuxtPlugin((NuxtApp) => {
24
+ const runtimeConfig = useRuntimeConfig();
25
+
26
+ const shopwareRuntimeConfigPublic = runtimeConfig.public
27
+ @@ -143,3 +147,5 @@ export default defineNuxtPlugin((NuxtApp) => {
28
+ },
29
+ };
30
+ });
31
+ +
32
+ +export default shopwarePlugin;
@@ -6,3 +6,5 @@ allowBuilds:
6
6
  sharp: true
7
7
  unrs-resolver: true
8
8
  vue-demi: true
9
+ patchedDependencies:
10
+ '@shopware/nuxt-module@1.5.1': patches/@shopware__nuxt-module@1.5.1.patch
Binary file
@@ -0,0 +1,49 @@
1
+ import type { components } from "~~/api-types/storeApiTypes";
2
+
3
+ type Schemas = components["schemas"];
4
+
5
+ const NAVIGATION_CRITERIA = {
6
+ depth: 10,
7
+ // flat list: in a tree, children would be dropped by the includes below
8
+ buildTree: false,
9
+ includes: {
10
+ category: ["seoUrl", "type", "updatedAt", "createdAt", "media"],
11
+ media: ["url"],
12
+ },
13
+ associations: {
14
+ media: {},
15
+ },
16
+ };
17
+
18
+ /**
19
+ * Dynamic sitemap source: categories of the main navigation and the menu
20
+ * category tree. Products follow once they have their own pages (#289).
21
+ */
22
+ export default defineSitemapEventHandler(async () => {
23
+ const { shopware, shopBite } = useRuntimeConfig().public;
24
+ const rootIds = new Set([
25
+ "main-navigation",
26
+ shopBite.menuCategoryId || "main-navigation",
27
+ ]);
28
+
29
+ const trees = await Promise.all(
30
+ [...rootIds].map((rootId) =>
31
+ $fetch<Schemas["Category"][]>(
32
+ `${shopware.endpoint}/navigation/main-navigation/${rootId}`,
33
+ {
34
+ method: "POST",
35
+ headers: {
36
+ "sw-access-key": shopware.accessToken,
37
+ "sw-include-seo-urls": "true",
38
+ },
39
+ body: NAVIGATION_CRITERIA,
40
+ },
41
+ ),
42
+ ),
43
+ );
44
+
45
+ return [
46
+ ...(shopBite.feature.contactForm ? ["/kontakt"] : []),
47
+ ...categoriesToSitemapUrls(trees.flat()),
48
+ ];
49
+ });