fix(examples): migrate example apps to SvelteKit 3 - #23
Merged
Merged
Conversation
The adapter migrated to SvelteKit 3, but the example apps still pinned
@sveltejs/kit ^2.60.1 (pre-2.62, before adapter-via-Vite-plugin support),
so the sveltekit({ adapter }) option was ignored and builds emitted no
server output — causing the integration workflow to fail with
CannotFindAsset on examples/basic/build-esb/server.
- Bump example @sveltejs/kit to 3.0.0-next.31, vite-plugin-svelte ^7.3.0,
svelte ^5.57.1, vite ^8.0.12.
- Await the async sveltekit() plugin in the example vite.config.ts files.
- Migrate examples/basic +error.svelte from the removed $app/stores to
$app/state (was rendering a 500 instead of the 404 error page).
Verified: all three build variants (esb+node, bun+node, streaming) emit
handler/stream output, and integ:local passes 18/18.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After the SvelteKit 3 adapter migration merged (#20), the Integration Tests workflow failed on
main(run 36772575685) in ~37s with:Root cause: the adapter package moved to SvelteKit 3, but the example apps still pinned
@sveltejs/kit@^2.60.1— which predates 2.62, where configuring the adapter via thesveltekit()Vite plugin was added. Under 2.60.1 thesveltekit({ adapter })option was silently ignored ("No adapter specified"), sovite buildproduced no adapter output and CDK had no server asset to deploy.A second latent issue surfaced once the builds worked:
examples/basic/src/routes/+error.sveltestill imported the removed$app/stores, so the custom 404 page threw at render and returned 500.Changes
@sveltejs/kit@3.0.0-next.31,@sveltejs/vite-plugin-svelte@^7.3.0,svelte@^5.57.1,vite@^8.0.12(bothbasicandstreaming).sveltekit()plugin in the examplevite.config.tsfiles.examples/basic/+error.sveltefrom$app/stores($page) to$app/state(page).Verification
server/output: esb+node, bun+node (viabun --bun run build), and streaming.bun run integ:local: 18 pass, 0 fail across esb/bun/HTTP-API configs (boots the built handlers locally, no AWS).bun run check: 0 warnings, 0 errors.bun test: 0 fail.The full AWS deploy/destroy suite (
integ:deploy-test-destroy) still needs a run — apply therun-integlabel or let thepush-to-main trigger exercise it after merge.