3a8229a4c7
BulkActionsBar.story.vue calls useProjectsStore() in top-level setup, which executes before story collection. Without Pinia plugin, Histoire build aborts with `getActivePinia() was called but there was no active Pinia` — uncaught exception kills the whole build (24 → 0 stories). Add createPinia() to histoire.setup.ts alongside Vuetify + vue-router. Also add `/recovery-use` and `/projects` routes to the stub router (parity with router/index.ts after Plan 5 frontend), so future story files needing those paths don't emit Vue Router warns. Histoire build now: exit 0, 35 stories / 63 variants in 80.6s. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
32 lines
1.5 KiB
TypeScript
32 lines
1.5 KiB
TypeScript
import { defineSetupVue3 } from '@histoire/plugin-vue';
|
|
import { createPinia } from 'pinia';
|
|
import { createMemoryHistory, createRouter } from 'vue-router';
|
|
import { vuetify } from './plugins/vuetify';
|
|
|
|
export const setupVue3 = defineSetupVue3(({ app }) => {
|
|
const router = createRouter({
|
|
history: createMemoryHistory(),
|
|
routes: [
|
|
{ path: '/', component: { template: '<div />' } },
|
|
{ path: '/login', component: { template: '<div />' } },
|
|
{ path: '/register', component: { template: '<div />' } },
|
|
{ path: '/forgot', component: { template: '<div />' } },
|
|
{ path: '/2fa', component: { template: '<div />' } },
|
|
{ path: '/recovery', component: { template: '<div />' } },
|
|
{ path: '/recovery-use', component: { template: '<div />' } },
|
|
{ path: '/dashboard', component: { template: '<div />' } },
|
|
{ path: '/deals', component: { template: '<div />' } },
|
|
{ path: '/kanban', component: { template: '<div />' } },
|
|
{ path: '/projects', component: { template: '<div />' } },
|
|
{ path: '/reminders', component: { template: '<div />' } },
|
|
{ path: '/billing', component: { template: '<div />' } },
|
|
{ path: '/reports', component: { template: '<div />' } },
|
|
{ path: '/managers', component: { template: '<div />' } },
|
|
{ path: '/settings', component: { template: '<div />' } },
|
|
],
|
|
});
|
|
app.use(vuetify);
|
|
app.use(router);
|
|
app.use(createPinia());
|
|
});
|