feat(examples): add SvelteKit getting-started starter - #3892
Open
MeritonPylla wants to merge 1 commit into
Open
Conversation
Port the closed v1 starter (superdoc#3858) onto main's flat examples layout with SSR scoped off, readiness/export UX, and a Playwright smoke test.
There was a problem hiding this comment.
1 issue found across 17 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid β if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="examples/sveltekit/playwright.config.ts">
<violation number="1" location="examples/sveltekit/playwright.config.ts:14">
P2: This config binds the webserver to port 4177, which is already used by examples/custom-ui/playwright.config.ts. Since `check:examples` runs every example's Playwright suite with `pnpm --recursive` (parallel by default), sveltekit and custom-ui can start their preview servers concurrently; with --strictPort and reuseExistingServer:false the second one fails to bind, causing intermittent CI failures. Pick a port unique across examples (the sibling configs use 4174β4181).</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| trace: 'retain-on-failure', | ||
| }, | ||
| webServer: { | ||
| command: 'pnpm run build && pnpm run preview --host 127.0.0.1 --port 4177 --strictPort', |
There was a problem hiding this comment.
P2: This config binds the webserver to port 4177, which is already used by examples/custom-ui/playwright.config.ts. Since check:examples runs every example's Playwright suite with pnpm --recursive (parallel by default), sveltekit and custom-ui can start their preview servers concurrently; with --strictPort and reuseExistingServer:false the second one fails to bind, causing intermittent CI failures. Pick a port unique across examples (the sibling configs use 4174β4181).
Prompt for AI agents
Check if this issue is valid β if so, understand the root cause and fix it. At examples/sveltekit/playwright.config.ts, line 14:
<comment>This config binds the webserver to port 4177, which is already used by examples/custom-ui/playwright.config.ts. Since `check:examples` runs every example's Playwright suite with `pnpm --recursive` (parallel by default), sveltekit and custom-ui can start their preview servers concurrently; with --strictPort and reuseExistingServer:false the second one fails to bind, causing intermittent CI failures. Pick a port unique across examples (the sibling configs use 4174β4181).</comment>
<file context>
@@ -0,0 +1,19 @@
+ trace: 'retain-on-failure',
+ },
+ webServer: {
+ command: 'pnpm run build && pnpm run preview --host 127.0.0.1 --port 4177 --strictPort',
+ url: 'http://127.0.0.1:4177',
+ reuseExistingServer: false,
</file context>
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.
The examples catalog has React and vanilla quickstarts, but no SvelteKit starter. This adds one under
examples/sveltekit.The part worth a look is SSR. SuperDoc only runs in the browser, so if it loads during SSR you get
document is not defined. I didn't want to turn SSR off for the whole app, so I setssr = falseon just the editor route and mount the editor in a client-only$effect. Everything else in an app keeps server rendering.Registered it like the other v2 examples:
examples/README.md,go-links/links.json, andpublished-routes.json.Tested locally:
typecheck/build/ Playwright smoke pass, and it renders a real.docxwith a clean console.Re-opened against
mainfor v2 after #3858 (which targetedv1) was closed.