feat: Add service worker for asset caching
- Add Workbox-based service worker to cache JS, CSS, and fonts - JS/CSS cached for 30 days, fonts for 1 year - Support for CDN assets via ASSET_CDN_HOST - Version-based cache invalidation on deployments - Automatic cache cleanup for old versions - Build service worker during asset precompilation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
8b230c6920
commit
d34df7c314
@@ -5,6 +5,8 @@ task before_assets_precompile: :environment do
|
||||
system('pnpm install')
|
||||
system('echo "-------------- Bulding SDK for Production --------------"')
|
||||
system('pnpm run build:sdk')
|
||||
system('echo "-------------- Building Service Worker --------------"')
|
||||
system('NODE_ENV=production pnpm run build:sw')
|
||||
system('echo "-------------- Bulding App for Production --------------"')
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user