diff --git a/app/game-frontend/src/stores/mainDashboard.ts b/app/game-frontend/src/stores/mainDashboard.ts index fdce2454..ad242ffc 100644 --- a/app/game-frontend/src/stores/mainDashboard.ts +++ b/app/game-frontend/src/stores/mainDashboard.ts @@ -1,6 +1,10 @@ import { computed, ref, toRaw, watch } from 'vue'; import { defineStore } from 'pinia'; -import { MESSAGE_MAILBOX_NATIONAL_BASE, MESSAGE_MAILBOX_PUBLIC, type MessageType } from '@sammo-ts/logic'; +import { + MESSAGE_MAILBOX_NATIONAL_BASE, + MESSAGE_MAILBOX_PUBLIC, + type MessageType, +} from '@sammo-ts/logic/messages/message.js'; import { applyReadModelDelta, cloneReadModelJson, diff --git a/app/game-frontend/test/routerLoading.test.ts b/app/game-frontend/test/routerLoading.test.ts index 8a3f3aa1..e7eb4d23 100644 --- a/app/game-frontend/test/routerLoading.test.ts +++ b/app/game-frontend/test/routerLoading.test.ts @@ -4,6 +4,7 @@ import path from 'node:path'; import { describe, it } from 'node:test'; const routerSourcePath = path.resolve(import.meta.dirname, '../src/router/index.ts'); +const mainDashboardSourcePath = path.resolve(import.meta.dirname, '../src/stores/mainDashboard.ts'); void describe('game route loading contract', () => { void it('loads view components through route-level dynamic imports', async () => { @@ -18,4 +19,11 @@ void describe('game route loading contract', () => { assert.equal(lazyViewImports.length, routedViewComponents.size); assert.ok(lazyViewImports.length >= 35); }); + + void it('does not preload the server-side logic barrel from the main dashboard', async () => { + const source = await readFile(mainDashboardSourcePath, 'utf8'); + + assert.doesNotMatch(source, /from\s+['"]@sammo-ts\/logic['"]/); + assert.match(source, /from\s+['"]@sammo-ts\/logic\/messages\/message\.js['"]/); + }); });