Fix maintenance /assets 403 and remove vite-plugin-pwa

- nginx try_files: remove $uri/ so the Vite assets/ build directory
  doesn't shadow the /assets React route and trigger a 403
- Remove VitePWA plugin (leftover from scaffold, not needed for internal app)
- Strip PWA-specific nginx location blocks (manifest, sw.js, registerSW.js)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-14 08:45:32 +00:00
parent c43a23b00d
commit a3b458abca
3 changed files with 3 additions and 44 deletions

View file

@ -1,31 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
base: '/maintenance/',
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
name: 'Maintenance',
short_name: 'Maint.',
start_url: '/maintenance/',
scope: '/maintenance/',
display: 'standalone',
theme_color: '#b45309',
background_color: '#b45309',
icons: [
{ src: '/maintenance/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
{ src: '/maintenance/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
],
},
workbox: {
navigateFallback: '/maintenance/index.html',
navigateFallbackDenylist: [/\/api\//],
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
},
}),
],
plugins: [react()],
})