Add Nuxt extends: layer support + document stable override surface #6

Open
opened 2026-05-04 15:42:17 +02:00 by libretech · 0 comments
Owner

Part of #2

Problem

libreshop/shop's nuxt.config.ts does NOT use extends:. Adapters cannot extend it as a Nuxt layer without forking.

Native Nuxt 3 layer mechanism overrides per-path: pages/, components/, layouts/, plugins/, server/, public/, assets/, composables/, app.config.ts. NOT auto-merged: tailwind.config.ts, package.json, runtimeConfig defaults (env precedence at runtime).

Acceptance

  • Confirm nuxt.config.ts is consumable as a layer (export default config, no side-effecty hooks that break composition)
  • Add README section "Extending libreshop/shop as a Nuxt layer" with concrete adapter example
  • Define stable override surface (semver-protected):
    • Components: Header, Footer, Hero, TrustBar, ProductCard, PageSection
    • Layouts: default, bare, deep (introduce if missing)
    • Composables: useBranding(), useNavigation(), usePageContent()
  • Mark internal components explicitly (e.g. Background, Carousel subcomponents) — no override stability promise
  • CHANGELOG entry conventions for breaking the override surface (see #issue-7)
Part of https://git.librete.ch/libreshop/shop/issues/2 ## Problem libreshop/shop's `nuxt.config.ts` does NOT use `extends:`. Adapters cannot extend it as a Nuxt layer without forking. Native Nuxt 3 layer mechanism overrides per-path: `pages/`, `components/`, `layouts/`, `plugins/`, `server/`, `public/`, `assets/`, `composables/`, `app.config.ts`. NOT auto-merged: `tailwind.config.ts`, `package.json`, `runtimeConfig` defaults (env precedence at runtime). ## Acceptance - [ ] Confirm `nuxt.config.ts` is consumable as a layer (export default config, no side-effecty hooks that break composition) - [ ] Add `README` section "Extending libreshop/shop as a Nuxt layer" with concrete adapter example - [ ] Define **stable override surface** (semver-protected): - Components: `Header`, `Footer`, `Hero`, `TrustBar`, `ProductCard`, `PageSection` - Layouts: `default`, `bare`, `deep` (introduce if missing) - Composables: `useBranding()`, `useNavigation()`, `usePageContent()` - [ ] Mark internal components explicitly (e.g. `Background`, `Carousel` subcomponents) — no override stability promise - [ ] CHANGELOG entry conventions for breaking the override surface (see #issue-7)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: libreshop/shop#6
No description provided.