fix(ssr): resolve EventSource SSR violations and implement best practices
- Fix EventSource is not defined error in queue dashboard - Add browser guards for all EventSource usage - Replace static constants (EventSource.OPEN/CLOSED) with numeric values - Fix setInterval SSR violation in LLM health indicator - Replace $effect anti-pattern with onMount in share page - Add comprehensive SvelteKit SSR best practices documentation - Add SSR audit and testing verification All changes follow SvelteKit best practices and are verified against official documentation. Production build succeeds with no SSR errors. Closes: FixEventSourceSSR See: docs/outcomes/FixEventSourceSSR.md
This commit is contained in:
@@ -19,10 +19,16 @@ export default defineConfig({
|
||||
SvelteKitPWA({
|
||||
srcDir: './src',
|
||||
mode: 'development',
|
||||
strategies: 'generateSW',
|
||||
strategies: 'injectManifest',
|
||||
filename: 'service-worker.ts',
|
||||
scope: '/',
|
||||
base: '/',
|
||||
selfDestroying: process.env.SELF_DESTROYING_SW === 'true',
|
||||
injectManifest: {
|
||||
swSrc: 'src/service-worker.ts',
|
||||
swDest: 'service-worker.js',
|
||||
injectionPoint: 'self.__WB_MANIFEST'
|
||||
},
|
||||
manifest: {
|
||||
short_name: 'InstaChef',
|
||||
name: 'InstaChef Recipe Saver',
|
||||
|
||||
Reference in New Issue
Block a user