Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🚀 feat: Enhance PWA and asset caching strategy (#3822)

Danny Avila3b6132245943
diff --git a/.github/workflows/frontend-review.yml b/.github/workflows/frontend-review.yml
index c8ba609a72..ade5aa13fa 100644
--- a/.github/workflows/frontend-review.yml
+++ b/.github/workflows/frontend-review.yml
@@ -33,24 +33,25 @@ jobs:
run: npm run test:ci --verbose
working-directory: client
- tests_frontend_windows:
- name: Run frontend unit tests on Windows
- timeout-minutes: 60
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v4
- - name: Use Node.js 20.x
- uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: 'npm'
-
- - name: Install dependencies
- run: npm ci
-
- - name: Build Client
- run: npm run frontend:ci
-
- - name: Run unit tests
- run: npm run test:ci --verbose
- working-directory: client
+ # Windows job is commented out
+ # tests_frontend_windows:
+ # name: Run frontend unit tests on Windows
+ # timeout-minutes: 60
+ # runs-on: windows-latest
+ # steps:
+ # - uses: actions/checkout@v4
+ # - name: Use Node.js 20.x
+ # uses: actions/setup-node@v4
+ # with:
+ # node-version: 20
+ # cache: 'npm'
+
+ # - name: Install dependencies
+ # run: npm ci
+
+ # - name: Build Client
+ # run: npm run frontend:ci
+
+ # - name: Run unit tests
+ # run: npm run test:ci --verbose
+ # working-directory: client
\ No newline at end of file
diff --git a/client/vite.config.ts b/client/vite.config.ts
index 6b05d56383..6601eb32a8 100644
--- a/client/vite.config.ts
+++ b/client/vite.config.ts
@@ -55,7 +55,7 @@ export default defineConfig({
nodePolyfills(),
VitePWA({
injectRegister: 'auto', // 'auto' | 'manual' | 'disabled'
- registerType: 'prompt', // 'prompt' | 'auto' | 'disabled'
+ registerType: 'autoUpdate', // 'prompt' | 'autoUpdate'
devOptions: {
enabled: false, // enable/disable registering SW in development mode
},
@@ -118,6 +118,9 @@ export default defineConfig({
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