mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
🚀 feat: Enhance PWA and asset caching strategy (#3822)
* chore: Update VitePWA registerType to 'autoUpdate', add cache busting to static file outputs * chore: disable windows frontend workflow for now
This commit is contained in:
parent
7c1ee242eb
commit
3b61322459
2 changed files with 23 additions and 19 deletions
37
.github/workflows/frontend-review.yml
vendored
37
.github/workflows/frontend-review.yml
vendored
|
|
@ -33,24 +33,25 @@ jobs:
|
||||||
run: npm run test:ci --verbose
|
run: npm run test:ci --verbose
|
||||||
working-directory: client
|
working-directory: client
|
||||||
|
|
||||||
tests_frontend_windows:
|
# Windows job is commented out
|
||||||
name: Run frontend unit tests on Windows
|
# tests_frontend_windows:
|
||||||
timeout-minutes: 60
|
# name: Run frontend unit tests on Windows
|
||||||
runs-on: windows-latest
|
# timeout-minutes: 60
|
||||||
steps:
|
# runs-on: windows-latest
|
||||||
- uses: actions/checkout@v4
|
# steps:
|
||||||
- name: Use Node.js 20.x
|
# - uses: actions/checkout@v4
|
||||||
uses: actions/setup-node@v4
|
# - name: Use Node.js 20.x
|
||||||
with:
|
# uses: actions/setup-node@v4
|
||||||
node-version: 20
|
# with:
|
||||||
cache: 'npm'
|
# node-version: 20
|
||||||
|
# cache: 'npm'
|
||||||
|
|
||||||
- name: Install dependencies
|
# - name: Install dependencies
|
||||||
run: npm ci
|
# run: npm ci
|
||||||
|
|
||||||
- name: Build Client
|
# - name: Build Client
|
||||||
run: npm run frontend:ci
|
# run: npm run frontend:ci
|
||||||
|
|
||||||
- name: Run unit tests
|
# - name: Run unit tests
|
||||||
run: npm run test:ci --verbose
|
# run: npm run test:ci --verbose
|
||||||
working-directory: client
|
# working-directory: client
|
||||||
|
|
@ -55,7 +55,7 @@ export default defineConfig({
|
||||||
nodePolyfills(),
|
nodePolyfills(),
|
||||||
VitePWA({
|
VitePWA({
|
||||||
injectRegister: 'auto', // 'auto' | 'manual' | 'disabled'
|
injectRegister: 'auto', // 'auto' | 'manual' | 'disabled'
|
||||||
registerType: 'prompt', // 'prompt' | 'auto' | 'disabled'
|
registerType: 'autoUpdate', // 'prompt' | 'autoUpdate'
|
||||||
devOptions: {
|
devOptions: {
|
||||||
enabled: false, // enable/disable registering SW in development mode
|
enabled: false, // enable/disable registering SW in development mode
|
||||||
},
|
},
|
||||||
|
|
@ -118,6 +118,9 @@ export default defineConfig({
|
||||||
return 'vendor';
|
return 'vendor';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
entryFileNames: 'assets/[name].[hash].js',
|
||||||
|
chunkFileNames: 'assets/[name].[hash].js',
|
||||||
|
assetFileNames: 'assets/[name].[hash].[ext]',
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Ignore "use client" waning since we are not using SSR
|
* Ignore "use client" waning since we are not using SSR
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue