mirror of
https://github.com/vercel/flags.git
synced 2026-09-19 03:49:23 +08:00
701f3c2bf2
* use `$env/dynamic/private` from SvelteKit for convenience: people don't have to pass FLAGS_SECRET manually anymore then * allow flag to be called outside of the lifecycle of the handle hook, with a request object being the key for deduplication etc * add support for identifiers * fix types * new function for managing precomputed flags * align with next.js API instead * update example app * lockfile * test * fix example * restructure examples app * make it two flags to show power of precompute + code * add manual approach * lets see if preview deployment is picked up * change crypto usage to be usable in middleware * make sveltekit flags pkg usable within edge middleware * use ISR * changeset * enhance error message * use static env instead of dynamic env * bump kit * use vercel adapter * make sure Vite tooling is used for sveltekit entry point --------- Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
18 lines
558 B
JavaScript
18 lines
558 B
JavaScript
import adapter from '@sveltejs/adapter-vercel';
|
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
|
// for more information about preprocessors
|
|
preprocess: vitePreprocess(),
|
|
|
|
kit: {
|
|
// You can switch out the Vercel adapter with another one, though keep in mind that the precompute
|
|
// approach needs another approach then, as middleware.ts is Vercel concept.
|
|
adapter: adapter()
|
|
}
|
|
};
|
|
|
|
export default config;
|