mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
🔧 refactor: Build Process and Static Asset Handling (#7605)
* 🔧 chore: Update build script to include post-build image removal
* refactor: staticCache middleware with options and special handling for manifest/sw/index files
* refactor(pwa): optimize service worker caching strategy
* refactor: streamline post-build process and update public directory handling
* chore: remove external images from rollupOptions in Vite config
* chore: enhance logging message in post-build script for clarity
This commit is contained in:
parent
2f462c9b3c
commit
f556aaeaea
4 changed files with 64 additions and 13 deletions
14
client/scripts/post-build.cjs
Normal file
14
client/scripts/post-build.cjs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
const fs = require('fs-extra');
|
||||
|
||||
async function postBuild() {
|
||||
try {
|
||||
await fs.copy('public/assets', 'dist/assets');
|
||||
await fs.copy('public/robots.txt', 'dist/robots.txt');
|
||||
console.log('✅ PWA icons and robots.txt copied successfully. Glob pattern warnings resolved.');
|
||||
} catch (err) {
|
||||
console.error('❌ Error copying files:', err);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
postBuild();
|
||||
Loading…
Add table
Add a link
Reference in a new issue