@ux-ui/tsdown-config
v0.1.0
Published
tsdown config factory for the ux-ui-pro npm portfolio (assembly.md §5.1/§5.3).
Maintainers
Readme
@ux-ui/tsdown-config
tsdown config factory for the ux-ui-pro npm portfolio. Encodes the §5.1
library base (fixedExtension: false, minify: false, dts via tsconfig.build.json, source
maps) and the §5.3 CSS-sidecar variant, so each package's tsdown.config.ts stays a couple of
lines and never drifts.
Installation
npm install -D @ux-ui/tsdown-config tsdown
# CSS-sidecar packages (§5.3) additionally:
npm install -D @tsdown/css sass-embeddedtsdown is a peer dependency; @tsdown/css is an optional peer (only for CSS libraries).
Usage
Standard TS library (§5.1):
// tsdown.config.ts
import { defineLibrary } from '@ux-ui/tsdown-config';
export default defineLibrary({ platform: 'browser' });Web Component + CSS sidecar (§5.3):
// tsdown.config.ts
import { defineCssLibrary } from '@ux-ui/tsdown-config';
export default defineCssLibrary({
cssFileName: 'dialog-lite.css',
entry: { index: 'src/index.ts', vue: 'src/vue.ts' },
deps: { neverBundle: ['vue'] },
});Overrides are deep-merged onto the base via tsdown's own mergeConfig.
API
| Export | Signature | Description |
| --- | --- | --- |
| defineLibrary | (overrides?: UserConfig) => UserConfig | §5.1 base + per-package overrides. |
| defineCssLibrary | ({ cssFileName, ...overrides }: CssLibraryOptions) => UserConfig | §5.1 base + CSS sidecar (§5.3). |
exports is not auto-generated — the portfolio fixes it by hand and validates with
publint/attw (§5.1).
License
MIT
