Skip to content

fix(examples): Update of with-svelte example#11952

Open
floriansalihovic wants to merge 5 commits intovercel:mainfrom
floriansalihovic:chore/updating-svelte-example
Open

fix(examples): Update of with-svelte example#11952
floriansalihovic wants to merge 5 commits intovercel:mainfrom
floriansalihovic:chore/updating-svelte-example

Conversation

@floriansalihovic
Copy link

@floriansalihovic floriansalihovic commented Feb 21, 2026

Description

When running pnpm dlx create-turbo@latest -e with-svelte the current version of the example creates a project with several issues.

  • The typescript-config/svelte.json conflicts with the configuration emitted by svelte-kit, thus the values for moduleResolution, module, and target are changed to the svelte-kit values.
  • The ui package references the component in the wrong path and there were conflicts with the types.
  • The configuration changes enable a seamless IDE integration without any TypeScript errors. To make the example cover more cases of a common Svelte project, a store is added using runes for reactivity corresponding to a TypeScript type.

House keeping

  • updating dependencies
  • updating README.md

Testing Instructions

Rum turbo build && pnpm dev in the example dir.

The original build would not fail, but IDEs (i.e. Webstorm) would report errors. web and dev don't provide tests.

- extending `ui` sample component and a rune based store
- changing `moduleResolution`, `module`, and `target` to values corresponding to values emitted by svelte kit's tsconfig
- consolidating dependency versions
- setting engine to latest LTS: Node.js 24
@floriansalihovic floriansalihovic requested a review from a team as a code owner February 21, 2026 15:32
@floriansalihovic floriansalihovic requested review from tknickman and removed request for a team February 21, 2026 15:32
@turbo-orchestrator turbo-orchestrator bot added the area: examples Improvements or additions to examples label Feb 21, 2026
@vercel
Copy link
Contributor

vercel bot commented Feb 21, 2026

@floriansalihovic is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

- replacing invalid `includes` field with `files`
- downgrading reverting changes of the engine field, requiring version 18
@vercel
Copy link
Contributor

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examples-svelte-web Ready Ready Preview, Comment, Open in v0 Mar 2, 2026 8:33pm

Copy link
Contributor

@anthonyshew anthonyshew left a comment

Choose a reason for hiding this comment

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

I'm seeing this error when I run the lint task:

/Users/anthonyshew/projects/open/turbo/examples/with-svelte/packages/ui/dist/MyCounterButton.svelte.d.ts
  1:82  error  The `{}` ("empty object") type allows any non-nullish value, including literals like `0` and `""`.
- If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option.
- If you want a type meaning "any object", you probably want `object` instead.
- If you want a type meaning "any value", you probably want `unknown` instead  @typescript-eslint/no-empty-object-type

@floriansalihovic
Copy link
Author

I'm seeing this error when I run the lint task:

/Users/anthonyshew/projects/open/turbo/examples/with-svelte/packages/ui/dist/MyCounterButton.svelte.d.ts
  1:82  error  The `{}` ("empty object") type allows any non-nullish value, including literals like `0` and `""`.
- If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option.
- If you want a type meaning "any object", you probably want `object` instead.
- If you want a type meaning "any value", you probably want `unknown` instead  @typescript-eslint/no-empty-object-type

I will have a look and fix the issues.

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

Labels

area: examples Improvements or additions to examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants