Acceptance Criteria
- The preset loader (
packages/transform/src/preset-loader.ts) detects a .json module by extension and reads it (readFile + JSON.parse) instead of import()-ing it - Both carriers yield the same
ThemeTokensConfig and satisfy the loader's existing "resolved export is a plain object" guard - Lumina's
.ts presets keep working unchanged - A JSON preset requires no build step — its
module points at the .json directly - Tests cover JSON and JS/TS resolution plus a malformed-JSON error
Approach
Add an extension check at the top of the loader's resolve path; everything downstream (merge, scope filter) is unchanged.
Dependencies
- WORK-456 — the pack format /
module field
References
- SPEC-111 §6;
packages/transform/src/preset-loader.ts