diff --git a/app/game-frontend/src/views/MyPageView.vue b/app/game-frontend/src/views/MyPageView.vue index 28d367d7..61b037a6 100644 --- a/app/game-frontend/src/views/MyPageView.vue +++ b/app/game-frontend/src/views/MyPageView.vue @@ -3,7 +3,7 @@ import { computed, onMounted, reactive, ref, watch } from 'vue'; import { trpc } from '../utils/trpc'; import { formatLog } from '../utils/formatLog'; import { formatSeoulDateTime } from '../utils/legacyDateTime'; -import { isDefenceTrainPenaltyWaivedByScenarioEffect } from '@sammo-ts/logic'; +import { isDefenceTrainPenaltyWaivedByScenarioEffect } from '@sammo-ts/logic/scenario/scenarioEffect.js'; import { useSessionStore } from '../stores/session'; import { resolveGeneralIconUrl, useDefaultGeneralIcon } from '../utils/generalIcon'; import LegacyGeneralProgress from '../components/ui/LegacyGeneralProgress.vue'; diff --git a/app/game-frontend/test/routerLoading.test.ts b/app/game-frontend/test/routerLoading.test.ts index e7eb4d23..f3a789e9 100644 --- a/app/game-frontend/test/routerLoading.test.ts +++ b/app/game-frontend/test/routerLoading.test.ts @@ -5,6 +5,7 @@ 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'); +const myPageSourcePath = path.resolve(import.meta.dirname, '../src/views/MyPageView.vue'); void describe('game route loading contract', () => { void it('loads view components through route-level dynamic imports', async () => { @@ -26,4 +27,11 @@ void describe('game route loading contract', () => { assert.doesNotMatch(source, /from\s+['"]@sammo-ts\/logic['"]/); assert.match(source, /from\s+['"]@sammo-ts\/logic\/messages\/message\.js['"]/); }); + + void it('does not preload the server-side logic barrel from the my-page route', async () => { + const source = await readFile(myPageSourcePath, 'utf8'); + + assert.doesNotMatch(source, /from\s+['"]@sammo-ts\/logic['"]/); + assert.match(source, /from\s+['"]@sammo-ts\/logic\/scenario\/scenarioEffect\.js['"]/); + }); });