mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-01 11:36:29 +00:00
* 🖼️ fix: Precache PWA Icons and Let Them Refresh Production builds set `publicDir: false`, so `client/scripts/post-build.cjs` copied `public/assets` into `dist/assets` only after `vite build` had finished. vite-plugin-pwa globs `dist/` from its `closeBundle` hook, inside that build, so the icon patterns in `workbox.globPatterns` matched zero files and the generated `sw.js` shipped without a single icon, silently: workbox treats an empty glob as a no-op. `build:ci`, used by the Playwright lanes, never ran the post-build step at all and produced a `dist` with no icons or `robots.txt`. Move the copy into a `copyPublicAssets()` build plugin that runs in `writeBundle`, which completes for every plugin before `closeBundle`, and drop the post-build script with its lone `fs-extra` dependency. Ordering alone was not enough. The plugin defaults `dontCacheBustURLsMatching` to `/^assets\//`, true only for hashed bundle output. The icons live in `assets/` under stable filenames, so they entered the manifest with `revision: null`, permanently immutable, meaning an installed PWA would never pick up a rebranded icon: the other half of the report. Match Vite's `[name].[hash].[ext]` shape instead so hashed chunks stay revision-free while the icons carry content revisions. Also drop `manifest.webmanifest` from `globPatterns`, since the plugin always appends it as an additional manifest entry and globbing it duplicated the precache entry. A clean `npm run build` now yields 55 precache entries with all five icons revisioned, against 0 icon entries before. * 📝 docs: Describe the Full Copy Set in copyPublicAssets * 🔒 chore: Drop fs-extra From bun.lock |
||
|---|---|---|
| .. | ||
| a11y.yml | ||
| agents-integration-tests.yml | ||
| backend-review.yml | ||
| build.yml | ||
| cache-integration-tests.yml | ||
| client.yml | ||
| codegraph-e2e-votes.yml | ||
| codegraph-select.yml | ||
| data-provider.yml | ||
| data-schemas.yml | ||
| deploy.yml | ||
| dev-branch-images.yml | ||
| dev-images.yml | ||
| dev-staging-images.yml | ||
| docker-publish.yml | ||
| docker-smoke.yml | ||
| frontend-review.yml | ||
| frontend-windows-nightly.yml | ||
| helmcharts.yml | ||
| langfuse-fanout.yml | ||
| locize-i18n-sync.yml | ||
| main-image-workflow.yml | ||
| playwright-bombadil.yml | ||
| playwright-mock.yml | ||
| pr-retarget-dev.yml | ||
| retry-docker-builds.yml | ||
| static-checks.yml | ||
| sync-helm-chart-tags.yml | ||
| tag-images.yml | ||