create-saasicat-admin 0.23.0 → 0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-saasicat-admin",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Scaffolding CLI for SuperAdmin frontend projects (Vue 3 + Quasar + Vite). Generates a minimal working admin app built on @saasicat/ui-vue. Usage: `pnpm create saasicat-admin <dir>`.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,6 +13,27 @@ export default defineConfig({
13
13
  sassVariables: fileURLToPath(new URL('./src/styles/theme.scss', import.meta.url)),
14
14
  }),
15
15
  ],
16
+ // Exactly one copy of each of these, always.
17
+ //
18
+ // `createSuperAdminApp()` CREATES the router, the Pinia instance and the
19
+ // Quasar plugin; this app's own pages then consume them through
20
+ // `useRoute()`, `useRouter()` and store hooks. Those APIs work by module
21
+ // identity — `provide`/`inject` with a key that is a module-level symbol —
22
+ // so two copies of the library do not share one, and the lookup silently
23
+ // returns `undefined`.
24
+ //
25
+ // The platform ships its pages as `.vue` SOURCE (decision E3), so their
26
+ // `import … from 'vue-router'` resolves relative to the platform package,
27
+ // while this app's own files resolve relative to here. Without dedupe the
28
+ // bundle ends up with both, and every consumer page that reads a route
29
+ // param throws `Cannot read properties of undefined (reading 'params')` —
30
+ // the shell renders, the content area is blank.
31
+ //
32
+ // The list is `@saasicat/ui-vue`'s peerDependencies: a peer is precisely a
33
+ // dependency the host is expected to own exactly one of.
34
+ resolve: {
35
+ dedupe: ['vue', 'vue-router', 'pinia', 'quasar'],
36
+ },
16
37
  server: {
17
38
  port: __DEV_PORT__,
18
39
  proxy: {