Files
vercel__flags/examples/sveltekit-example
Simon H 701f3c2bf2 Sveltekit flags enhancements (#75)
* 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>
2025-03-21 14:43:28 +02:00
..
2025-03-21 14:43:28 +02:00
2024-12-12 13:01:06 +02:00
2024-12-12 13:01:06 +02:00
2024-12-12 13:01:06 +02:00
2024-12-12 13:01:06 +02:00
2024-12-12 13:01:06 +02:00
2024-12-12 13:01:06 +02:00
2024-12-12 13:01:06 +02:00
2024-12-12 13:01:06 +02:00
2024-12-12 13:01:06 +02:00
2024-12-12 13:01:06 +02:00

create-svelte

Everything you need to build a Svelte project, powered by create-svelte.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.