Publish and Release
Build Output and Publishing
- Every build writes into its own project's
dist/—packages/logger/dist,applications/caelundas/dist— never a top-level one.distis already gitignored and in the folder-structure rule'signorePatterns. configuration/tsconfig.jsonsetsdeclaration: true, so every build emits.d.tsbeside its.js. Turning it off silently removes the types a published package ships.- A package's
main,types, andexportspoint at TypeScript sources, andpublishConfigcarries the emitteddist/paths beside them — pnpm applies those at publish time, so one manifest serves the workspace and a published consumer. Verify a change here by packing, not by reading:pnpm packin the package, then inspect the tarball'spackage.json. filesmust namedist. Without it, packing falls back to the ignore files and the tarball ships no build output at all.- A plugin entry's
resolvePluginServicemust stay a static import. A dynamicimport()escapes the@swc-node/registerrequire hook into Node's own ESM resolver, andnx gthen fails withCannot find module './modules/plugin/plugin-context.utilities'.
Why the manifest fields stay on sources, which publishConfig fields pnpm
actually applies, and why shrinking the Nx plugin closure buys nothing is
ADR 0009. Do
not point main or exports at dist/ — it deadlocks the plugin graph load
and breaks fallow-dead-code and vitest.