-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: dev/preview platform emulation (#11730)
* introduce devPlatform kit configuration * Revert "introduce devPlatform kit configuration" This reverts commit 4a847e4. * add emulatPlatform method to adapters * use latest wrangler release * make wrangler a peer dependency of the cloudflare adapters * add emulate function to adapter API * regenerate types * fix * move cloudflare adapter changes into separate PR * lockfile * emulate platform during prerender * fix types * test * docs * regenerate types * reset pnpm-lock.yaml * prettier * goddammit * Create chatty-walls-warn.md --------- Co-authored-by: Dario Piotrowicz <[email protected]> Co-authored-by: Rich Harris <[email protected]>
- Loading branch information
1 parent
6161351
commit bab711e
Showing
16 changed files
with
149 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@sveltejs/kit": minor | ||
--- | ||
|
||
feat: dev/preview/prerender platform emulation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/kit/test/apps/basics/src/routes/adapter/dynamic/+page.server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const prerender = false; | ||
|
||
export const config = { | ||
message: 'hello from dynamic page' | ||
}; | ||
|
||
export function load({ platform }) { | ||
return { | ||
platform | ||
}; | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/kit/test/apps/basics/src/routes/adapter/dynamic/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script> | ||
export let data; | ||
</script> | ||
|
||
<pre>{JSON.stringify(data.platform)}</pre> |
11 changes: 11 additions & 0 deletions
11
packages/kit/test/apps/basics/src/routes/adapter/prerendered/+page.server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const prerender = true; | ||
|
||
export const config = { | ||
message: 'hello from prerendered page' | ||
}; | ||
|
||
export function load({ platform }) { | ||
return { | ||
platform | ||
}; | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/kit/test/apps/basics/src/routes/adapter/prerendered/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script> | ||
export let data; | ||
</script> | ||
|
||
<pre>{JSON.stringify(data.platform)}</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters