@mundogamernetwork/shared-ui 1.2.5 → 1.2.6

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 (2) hide show
  1. package/nuxt.config.ts +30 -0
  2. package/package.json +1 -1
package/nuxt.config.ts CHANGED
@@ -61,6 +61,36 @@ export default defineNuxtConfig({
61
61
  priority: SHARED_UI_COMPONENT_PRIORITY,
62
62
  },
63
63
  ],
64
+ // @pinia/nuxt only auto-scans the top-level app's own storesDirs by
65
+ // default — it does NOT pick up an extended layer's stores/ directory on
66
+ // its own. Every consuming app previously had to hand-list these specific
67
+ // files in its own nuxt.config.ts pinia.storesDirs (see tv-frontend/
68
+ // community-frontend/agency-frontend history) — easy to forget for new
69
+ // apps and a real cause of a production 500 (useAnnouncementStore /
70
+ // useAppInstallBannerStore "is not defined") when tv-frontend's list
71
+ // went stale relative to shared-ui.
72
+ //
73
+ // Nuxt/c12 merges extended-layer config via defu, which concatenates
74
+ // arrays, so declaring these here gets picked up by every consumer
75
+ // automatically without they having to list them — consumers can still
76
+ // add their own storesDirs entries and this list just gets appended.
77
+ //
78
+ // Deliberately an explicit file list, NOT "${packageRoot}/stores/**" —
79
+ // shared-ui also ships auth/chat/contact/institutional/index stores that
80
+ // collide by name with consuming apps' own, more full-featured local
81
+ // versions; a full glob would silently override them.
82
+ //
83
+ // Absolute paths (via packageRoot), same reasoning as the components dir
84
+ // above: a relative path here resolves against the *consuming app's*
85
+ // srcDir when this file is loaded as an extended layer, not shared-ui's
86
+ // own directory.
87
+ pinia: {
88
+ storesDirs: [
89
+ `${packageRoot}/stores/announcement.ts`,
90
+ `${packageRoot}/stores/appInstallBanner.ts`,
91
+ `${packageRoot}/stores/promotion.ts`,
92
+ ],
93
+ },
64
94
  css: [
65
95
  "@mundogamernetwork/shared-ui/assets/kit/kit-base.css",
66
96
  "@mundogamernetwork/shared-ui/assets/kit/kit-theme.css",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",