feat: configure ESM package boundaries across the workspace (E00-S01-T03)
CI / Frozen lockfile install (pull_request) Successful in 39s
CI / Frozen lockfile install (pull_request) Successful in 39s
Adds ESM boundary declarations to every workspace package manifest (apps/server, packages/core, extensions/example): "type": "module", "main"/"types" entry points and an "exports" map (types + import conditions) so each package exposes only its public root; adds "type": "module" to the workspace root package.json so the workspace is uniformly ESM. Placeholder src/index.ts files stay as empty ESM modules. Verified: each package compiles under tsconfig.base.json (NodeNext) with TypeScript 6.0.3 and emits ESM dist/index.js + dist/index.d.ts; Node imports each package by name through its exports map and rejects deep subpath imports (ERR_PACKAGE_PATH_NOT_EXPORTED); pnpm 11.23.0 install --frozen-lockfile passes with the lockfile unchanged. Closes #156
This commit is contained in:
@@ -2,5 +2,14 @@
|
||||
"name": "@personal-blog/example-extension",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"description": "Placeholder extension that exercises the extensions/ workspace group. Real extensions (e.g. theme-amber) replace it in later stories."
|
||||
"type": "module",
|
||||
"description": "Placeholder extension that exercises the extensions/ workspace group. Real extensions (e.g. theme-amber) replace it in later stories.",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user