Files
LibreChat/turbo.json
Danny Avila cb6dbc8f60 refactor: Migrate @librechat/client build to tsdown (#13596)
*  refactor: Migrate @librechat/client build from Rollup to tsdown

Mirrors the data-schemas migration. Replaces Rollup (rpt2 + postcss) with
tsdown (rolldown + oxc); the package build drops from tens of seconds to ~0.3s.

- Emit isolated-declaration .d.ts via oxc (dts.oxc) and enforce
  isolatedDeclarations in tsconfig for editor DX (source made clean: explicit
  export type annotations added across src, no `any`).
- Extract component CSS to dist/style.css so the CJS output stays valid
  CommonJS (the prior postcss runtime-injection produced an ESM import in the
  CJS bundle that breaks jest/require). Imported once in the client app entry;
  Vite bundles it for the app.
- Repoint package.json to dual .mjs/.cjs + .d.mts/.d.cts and add ./style.css
  and ./package.json exports.
- Update CI build-cache keys to hash tsdown.config.mjs; remove rollup.config.js.

* 🔧 chore: address Codex review on client tsdown migration

- Add tsdown.config.mjs to turbo.json build `inputs` so changes to the new
  bundler config invalidate the Turbo cache (the shared inputs only listed the
  rollup configs). Also covers the already-migrated data-schemas.
- Name the memoized default export (ControlComboboxMemo) instead of the
  codefix-generated `_default_1`, for clearer stack traces / grepping.
2026-06-08 11:20:03 -04:00

38 lines
1015 B
JSON

{
"$schema": "https://v2-9-16.turborepo.dev/schema.json",
"globalDependencies": ["package-lock.json"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"inputs": [
"src/**",
"!src/**/__tests__/**",
"!src/**/__mocks__/**",
"!src/**/*.test.*",
"!src/**/*.spec.*",
"scripts/**",
"rollup.config.js",
"server-rollup.config.js",
"tsdown.config.mjs",
"tsconfig.json",
"tsconfig.build.json",
"vite.config.ts",
"index.html",
"postcss.config.*",
"tailwind.config.*",
"package.json"
],
"outputs": ["dist/**"]
},
"@librechat/data-schemas#build": {
"dependsOn": ["^build", "librechat-data-provider#build"]
},
"@librechat/api#build": {
"dependsOn": ["^build", "librechat-data-provider#build", "@librechat/data-schemas#build"]
},
"@librechat/client#build": {
"dependsOn": ["^build", "librechat-data-provider#build"]
}
}
}