perf: 로그인 메인 로직 배럴 로딩 제거

This commit is contained in:
2026-08-18 07:11:06 +00:00
parent ada8edc72e
commit e910a635e6
2 changed files with 13 additions and 1 deletions
@@ -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,
@@ -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['"]/);
});
});