Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
2 folders · 4 files
README.md
@monochromatic-dev/config-rolldown #
Shared raw-rolldown build configuration for Monochromatic packages.
Successor to @monochromatic-dev/config-tsdown;
see doc/planning/tsdown-removal.md for the migration record
and doc/philosophy/tool-choices.md for the bundler decision.
Flavors #
./.ts: neutral (browser-compatible) library builds, declarations viarolldown-plugin-dtswith theoxcgenerator, outputdist/final/neutral/[name].mjs../.node.ts: Node library, CLI, and plugin builds, same declaration setup, outputdist/final/node/[name].mjs.perEntryNodeConfigbuilds each input as its own self-contained bundle so committed and published bundles keep stable names and no shared chunks../.client.ts: self-contained browser scripts, no declarations, outputdist/client/[name].js.
AP5:
Client-side bundling packages:
add rolldown.client.config.ts extending @monochromatic-dev/config-rolldown/.client.ts,
a build:js:client task,
and this package as a devDependency.
Behavior notes #
- Externalization reads the consuming package's
package.jsonat build time: declared dependencies and peer dependencies stay external unless a bundle pattern forces them inline; undeclared bare imports (transitives of inlined workspace source) bundle by omission so artifacts stay self-contained outside the monorepo. - Bin-targeted entry chunks of Node builds get
#!/usr/bin/env nodeinjected at byte 0 (bin-shebang.ts) when the emitted chunk has no shebang, so a built CLI can never fall through to/bin/sh; a shebang already present is a user error and is left untouched. Abinentry pointing at output a build does not emit is ignored here, typo detection is not this plugin's job. - Targets come from Browserslist through
browserslistTargets, formatted as rolldown engine strings (rolldown rejects raw Browserslist queries). - Raw rolldown's
output.cleanDiris per-config and not watch-safe; per-entry configs sharing an out dir keep it off and rely on the owning mise task's pre-clean step.