mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-09-16 02:22:17 +00:00
2766e5ea67
DEPLOY_TARGET now selects the adapter; Netlify stays the default and NODE_ADAPTER keeps working. Cloudflare compresses in transit, so the Worker build aliases $lib/server/compression to a pass-through that leaves the streaming body alone. CI builds and dry-run deploys this target. That is compilation and packaging coverage only, not a production compatibility gate: native sharp still blocks the share-preview route in the Worker runtime.
28 lines
937 B
JavaScript
28 lines
937 B
JavaScript
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
// you don't need to do this if you're using generateSW strategy in your app
|
|
import { generateSW } from './pwa.mjs';
|
|
import { adapter } from './adapter.mjs';
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
|
// for more information about preprocessors
|
|
preprocess: vitePreprocess(),
|
|
|
|
kit: {
|
|
// Netlify by default; DEPLOY_TARGET selects the Cloudflare preview or Node test build.
|
|
adapter,
|
|
serviceWorker: {
|
|
// VitePWA owns registration. Registering here as well requests SvelteKit's default
|
|
// /service-worker.js even though the inject-manifest output is /prompt-sw.js.
|
|
register: false
|
|
},
|
|
files: {
|
|
// you don't need to do this if you're using generateSW strategy in your app
|
|
serviceWorker: generateSW ? undefined : 'src/prompt-sw.ts'
|
|
}
|
|
}
|
|
};
|
|
|
|
export default config;
|