UNPKG

@sveltejs/kit

Version:

SvelteKit is the fastest way to build Svelte apps

37 lines (28 loc) • 1.05 kB
/** * A fake asset path used in `vite dev` and `vite preview`, so that we can * serve local assets while verifying that requests are correctly prefixed */ export const SVELTE_KIT_ASSETS = '/_svelte_kit_assets'; export const GENERATED_COMMENT = '// this file is generated — do not edit it'; export const ENDPOINT_METHODS = [ 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD', 'QUERY' ]; export const MUTATIVE_METHODS = ['POST', 'PUT', 'PATCH', 'DELETE']; /** methods whose responses depend on the request body, so they can never be prerendered */ export const BODY_DEPENDENT_METHODS = [...MUTATIVE_METHODS, 'QUERY']; export const PAGE_METHODS = ['GET', 'POST', 'HEAD']; export const SRC_ROOT = import.meta.dirname; // eslint-disable-next-line n/prefer-global/process export const IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer; /** * If an an adapter deploys a catch-all serverless function, the rerouted URL * is stored in this header. */ export const REROUTED_URL_HEADER = 'x-sveltekit-rerouted-url';