@assistant-ui/x-buildutils
This package is an internal dependency of assistant-ui and does not follow semantic versioning. If you are not working inside this monorepo, you should use your own build pipeline instead.
What it provides
aui-buildCLI: invoked as"build": "aui-build"from every package'spackage.json. Compiles TypeScript with our shared strict config, validates that imports resolve to declaredexportssub-paths, and rewrites.tsimport specifiers to.jsso the emitted ESM works at runtime. Declarations come from one TypeScript program over the whole package (a TypeScript API pass after the JavaScript build for ESM packages, tsdown's declaration build mode for CommonJS ones), so two builds of the same commit produce the same.d.ts. A/// <reference>directive in an entry file carriespreserve="true", since the declaration emitter drops every other directive; either build fails on one without it.ts/: sharedtsconfigfragments (base.json,base-node.json,next.json, andtest.jsonfor a package's colocated vitest suites, which run under Node).types/: shared ambient types (e.g.browser-process).
Usage inside the monorepo
// packages/example/package.json
{
"scripts": {
"build": "aui-build"
},
"devDependencies": {
"@assistant-ui/x-buildutils": "workspace:*"
}
}
// packages/example/tsconfig.json
{
"extends": "@assistant-ui/x-buildutils/ts/base.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src"]
}