feat(chord): split the worker base at dynamic imports; workers/child entry

buildWorkerBase bundles with esbuild code splitting into one private directory: the entry
and its static chunks load at each fork, a lazily imported module and the packages it
imports only when imported. @earendil-works/chord/workers/child exports the worker's side
(workerMain, processLock) without esbuild.
This commit is contained in:
Mario Zechner 2026-11-05 01:27:21 +01:00
parent da95cd79c6
commit 7ac1a9e3a0
16 changed files with 203 additions and 65 deletions

View file

@ -43,6 +43,9 @@
"@earendil-works/chord/workers": [
"../../../packages/chord/src/node/workers/index.ts"
],
"@earendil-works/chord/workers/child": [
"../../../packages/chord/src/node/workers/child.ts"
],
"@earendil-works/chord/plugins": [
"../../../packages/chord/src/node/plugins/index.ts"
],