Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

disable srr svelteKit

/** @type {import('@sveltejs/kit').Handle} */
export async function handle({ event, resolve }) {
  const response = await resolve(event, {
    ssr: !event.url.pathname.startsWith('/admin'),
    transformPage: ({ html }) => html.replace('old', 'new')
  });
 
  return response;
}
Source by kit.svelte.dev #
 
PREVIOUS NEXT
Tagged: #disable #srr #svelteKit
ADD COMMENT
Topic
Name
4+6 =