LibreChat/scripts
Marco Beretta 5961f767fd 🔤 fix: Ship the Theme Font Faces With the Package (#16485)
* fix: ship the Inter, Roboto Mono and Inconsolata faces with the package

Move the woff2 files from client/public/fonts into packages/client/src/theme/fonts
and every @font-face rule (the app's Inter and Roboto Mono faces and
client/src/fonts.css) into theme/fonts.css, which tokens.css imports and the build
copies into dist with the files. Each url() names the file by a new
@librechat/client/fonts/* export: a relative path breaks under Vite with
@tailwindcss/postcss, because Vite inlines the import before Tailwind runs and
Tailwind reports every emitted declaration as coming from the root stylesheet.

The app loads the same files through the same import and still emits them to
assets/fonts with their licences, now read from the package; the $fonts alias is
gone. Inter and Roboto Mono gain their OFL texts beside Inconsolata's. The README's
consumer stylesheet moves the package stylesheet import above @config, where
Vite's inliner no longer skips it. The static checks' bundle freshness test reads a
subpath pattern export as the directory it maps into.

* docs: describe how the theme fonts resolve through the package export

* fix: leave subpath pattern exports out of the bundle freshness check

A pattern such as ./dist/fonts/* names no entry the design rules load, and
reading it as its directory made the freshness check depend on a directory the
synthetic build in suppression-baseline.spec.ts never dates. The scenario's
mirror of the manifest reading skips patterns the same way.

(cherry picked from commit 681515c9e5)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16485
2026-10-01 03:46:18 +00:00
..
activity-labels 🟦 chore: Convert Activity-Label Eval Harness to TypeScript (#14530) 2026-07-31 09:58:55 -04:00
merge-locize-download.mjs 🌉 fix: Preserve Missing Locize Translations (#14917) 2026-08-17 02:20:25 -04:00
redis-mode.sh 📉 perf: Bound Early Event Buffering for Detached Generations (#14612) 2026-08-03 19:03:37 -04:00
sort-imports.mts 🧤 docs: Define Safe Backend Error Contracts in AGENTS.md (#16443) 2026-09-28 08:25:26 -04:00
static-checks.mts 🔤 fix: Ship the Theme Font Faces With the Package (#16485) 2026-10-01 03:46:18 +00:00
validate-locize-download.mjs 🛡️ fix: Validate Translation Contracts Against English (#14914) 2026-08-16 22:55:05 -04:00