🔧 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:
Danny Avila 2025-05-28 09:27:12 -04:00
parent 2f462c9b3c
commit f556aaeaea
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
4 changed files with 64 additions and 13 deletions

View 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();