perf: 내 정보 화면의 로직 배럴 로딩 제거
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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['"]/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user