Files
mcpedia/packages/config/package.json
T
asepharyana 251a6e9b4d
CI / typecheck + build (turbo) (push) Canceled after 0s
refactor: centralize section config — remove all hardcoded section lists
- New packages/config/src/sections.ts: SECTIONS, SECTIONS_BY_ID, SECTION_IDS
  (no Node.js built-in imports — safe for client components)
- New package entrypoint: @mcpedia/config/sections (exports only sections.ts)
- Client components import from @mcpedia/config/sections (no node:fs in bundle)
- Server components import from @mcpedia/config (has env/fs, server-only)
- Removed hardcoded SECTIONS/SECTION_LABEL/SECTION_ICON from:
  - [section]/page.tsx (was inline array)
  - [section]/[...slug]/page.tsx (was hardcoded Record maps)
  - Sidebar.tsx (was inline array)
  - layout.tsx (was inline array)
  - page.tsx (was inline array)
  - create/page.tsx (was inline array via SECTIONS import)
- Added @mcpedia/config/sections entrypoint to package.json exports
2026-08-21 10:29:35 +07:00

14 lines
239 B
JSON

{
"name": "@mcpedia/config",
"version": "0.1.0",
"private": true,
"type": "module",
"exports": {
".": "./src/index.ts",
"./sections": "./src/sections.ts"
},
"dependencies": {
"@mcpedia/types": "workspace:*"
}
}