Skip to content

feat(examples): add SvelteKit getting-started starter - #3892

Open
MeritonPylla wants to merge 1 commit into
superdoc:mainfrom
MeritonPylla:feat/sveltekit-example-main
Open

feat(examples): add SvelteKit getting-started starter#3892
MeritonPylla wants to merge 1 commit into
superdoc:mainfrom
MeritonPylla:feat/sveltekit-example-main

Conversation

@MeritonPylla

@MeritonPylla MeritonPylla commented Aug 11, 2026

Copy link
Copy Markdown

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 set ssr = false on 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, and published-routes.json.

Tested locally: typecheck / build / Playwright smoke pass, and it renders a real .docx with a clean console.

Re-opened against main for v2 after #3858 (which targeted v1) was closed.

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.
@MeritonPylla MeritonPylla changed the title feat(examples): add SvelteKit quickstart for v2 feat(examples): add SvelteKit getting-started starter Aug 11, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant