diff --git a/.changeset/beige-gorillas-tell.md b/.changeset/beige-gorillas-tell.md new file mode 100644 index 000000000000..7912e6f4ea90 --- /dev/null +++ b/.changeset/beige-gorillas-tell.md @@ -0,0 +1,9 @@ +--- +'@sveltejs/adapter-cloudflare': patch +'@sveltejs/adapter-cloudflare-workers': patch +'@sveltejs/adapter-netlify': patch +'@sveltejs/adapter-node': patch +'@sveltejs/adapter-vercel': patch +--- + +Initialise `env` diff --git a/.changeset/pretty-kings-care.md b/.changeset/pretty-kings-care.md new file mode 100644 index 000000000000..fc1fd37e5ce7 --- /dev/null +++ b/.changeset/pretty-kings-care.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +Add `$env/static/private`, `$env/static/public`, `$env/dynamic/private` and `$env/dynamic/public` modules diff --git a/documentation/docs/06-hooks.md b/documentation/docs/06-hooks.md index a6b28d5d28f5..f1769fb23051 100644 --- a/documentation/docs/06-hooks.md +++ b/documentation/docs/06-hooks.md @@ -38,9 +38,6 @@ declare namespace App { interface Locals { user: User; } - interface Platform {} - interface Session {} - interface Stuff {} } const getUserInformation: (cookie: string | null) => Promise; diff --git a/documentation/docs/15-configuration.md b/documentation/docs/15-configuration.md index c51d158e81b5..6bd606854ec2 100644 --- a/documentation/docs/15-configuration.md +++ b/documentation/docs/15-configuration.md @@ -29,7 +29,9 @@ const config = { // ... } }, - moduleExtensions: ['.js', '.ts'], + env: { + publicPrefix: 'PUBLIC_' + }, files: { assets: 'static', hooks: 'src/hooks', @@ -44,6 +46,7 @@ const config = { parameter: '_method', allowed: [] }, + moduleExtensions: ['.js', '.ts'], outDir: '.svelte-kit', package: { dir: 'package', @@ -157,9 +160,11 @@ When pages are prerendered, the CSP header is added via a `` ta > Note that most [Svelte transitions](https://svelte.dev/tutorial/transition) work by creating an inline `