Skip to content

Commit ec5eeba

Browse files
AmitMYclaude
andcommitted
Fix GitHub Pages deployment issues
- Remove empty PWA icon references from manifest - Configure proper scope and start_url for GitHub Pages - Inline dynamic imports to fix web component loading - Add optimizeDeps config for SignWriting components 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 66d84d4 commit ec5eeba

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

vite.config.js

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,41 @@ export default defineConfig({
99
react(),
1010
VitePWA({
1111
registerType: 'autoUpdate',
12-
includeAssets: ['favicon.ico', 'robots.txt', 'apple-touch-icon.png'],
1312
manifest: {
1413
name: 'SignWriting Word Processor',
1514
short_name: 'SignWriter',
1615
description: 'Offline word processor for SignWriting',
1716
theme_color: '#ffffff',
1817
background_color: '#ffffff',
1918
display: 'standalone',
20-
scope: '/',
21-
start_url: '/',
22-
icons: [
23-
{
24-
src: 'pwa-192x192.png',
25-
sizes: '192x192',
26-
type: 'image/png'
27-
},
28-
{
29-
src: 'pwa-512x512.png',
30-
sizes: '512x512',
31-
type: 'image/png'
32-
}
33-
],
19+
scope: '/signwriting-word-processor/',
20+
start_url: '/signwriting-word-processor/',
3421
file_handlers: [
3522
{
36-
action: '/',
23+
action: '/signwriting-word-processor/',
3724
accept: {
3825
'application/x-signwriting': ['.sgnw']
3926
}
4027
}
4128
]
4229
},
4330
workbox: {
44-
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff,woff2}']
31+
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff,woff2}'],
32+
navigateFallback: null
4533
}
4634
})
4735
],
36+
build: {
37+
commonjsOptions: {
38+
include: [/node_modules/]
39+
},
40+
rollupOptions: {
41+
output: {
42+
inlineDynamicImports: true
43+
}
44+
}
45+
},
46+
optimizeDeps: {
47+
include: ['@sutton-signwriting/sgnw-components']
48+
}
4849
})

0 commit comments

Comments
 (0)