mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-09-16 02:22:17 +00:00
ff29095c47
- Ship one hashed Tailwind stylesheet instead of two (one render-blocking) - Compress responses in-app (brotli/gzip, streaming-safe) and precompress the node build so local and CI measurements match production - Validate the Supabase session once per request - Render the homepage immediately and stream public stats - Stream a Pokedex's entries with the page instead of fetching after hydration, running the rows and count queries in parallel - Shrink the avatar and offline placeholder images, fix layout shift, contrast, link names and missing meta descriptions - Add Lighthouse CI (mobile + desktop) with score and metric budgets, bundle-size budgets in the build tests, and signed-in speed scenarios
22 lines
893 B
JavaScript
22 lines
893 B
JavaScript
import process from 'node:process';
|
|
import AdapterNode from '@sveltejs/adapter-node';
|
|
import AdapterNetlify from '@sveltejs/adapter-netlify';
|
|
|
|
export const nodeAdapter = process.env.NODE_ADAPTER === 'true';
|
|
|
|
// Netlify is the deployment target; the node adapter exists so the service worker
|
|
// build tests can check the `build/client` layout a Node server produces, and so Lighthouse CI
|
|
// can audit a production build. Netlify's CDN compresses responses, so precompress here to match.
|
|
export const adapter = nodeAdapter
|
|
? AdapterNode({ precompress: true })
|
|
: AdapterNetlify({
|
|
// if true, will create a Netlify Edge Function rather
|
|
// than using standard Node-based functions
|
|
edge: false,
|
|
|
|
// if true, will split your app into multiple functions
|
|
// instead of creating a single one for the entire app.
|
|
// if `edge` is true, this option cannot be used
|
|
split: false
|
|
});
|