perf(test): stop typographySettings pulling @tanstack for four constants
typographySettingsStore (and its spec) imported DEFAULT_FONT_* from the $entities/Font root barrel, which re-exports FontVirtualList -> stores -> @tanstack/query-core. Under Vitest (no tree-shaking) that loaded the entire UI + TanStack graph just to read four constants. Import them from the pure $entities/Font/model/const/const module instead. Deep path is deliberate: it pulls only the constants, not the entity store graph. Mitigates the test-side cost of audit D-1 (root barrel not yet inert); the structural fix (inject stores into FontVirtualList) stays parked.
This commit is contained in:
+4
-1
@@ -15,7 +15,10 @@ import {
|
||||
DEFAULT_FONT_WEIGHT,
|
||||
DEFAULT_LETTER_SPACING,
|
||||
DEFAULT_LINE_HEIGHT,
|
||||
} from '$entities/Font';
|
||||
// Deep path (not the root barrel) on purpose: pulls only these pure
|
||||
// constants, not the entity's UI/store graph (+ @tanstack) — keeps this
|
||||
// feature store and its spec light at import. See audit D-1.
|
||||
} from '$entities/Font/model/const/const';
|
||||
import {
|
||||
type PersistentStore,
|
||||
createPersistentStore,
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import {
|
||||
DEFAULT_FONT_WEIGHT,
|
||||
DEFAULT_LETTER_SPACING,
|
||||
DEFAULT_LINE_HEIGHT,
|
||||
} from '$entities/Font';
|
||||
} from '$entities/Font/model/const/const';
|
||||
import {
|
||||
beforeEach,
|
||||
describe,
|
||||
|
||||
Reference in New Issue
Block a user