Skip to content

Update Svelte docs #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update Svelte docs #92

wants to merge 1 commit into from

Conversation

didier
Copy link

@didier didier commented May 14, 2025

Just some small tweaks that removes reference to "svelte 5 preview" and the old npm create CLI in favor of the current npx sv create pattern, as well as a wrong reference of src/routes/page.tsx.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Nicolapps Nicolapps requested a review from thomasballinger May 15, 2025 01:13
@@ -35,7 +32,7 @@ Learn how to query data from Convex in a Svelte app.
To get started, install the `convex` and `convex-svelte` packages.

```sh
cd my-app && npm install convex convex-svelte
cd my-app && npm install -D convex convex-svelte
Copy link
Member

Choose a reason for hiding this comment

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

I think that this change shouldn’t be applied because convex and convex-svelte are used at runtime.

Suggested change
cd my-app && npm install -D convex convex-svelte
cd my-app && npm install convex convex-svelte

Copy link
Author

Choose a reason for hiding this comment

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

In Svelte everything gets compiled in, it's normal for everything to be a dev dependency unless you specifically want something to be externalized

I have multiple large repos (not Convex) with only devDependencies.

It's worth testing if this correctly compiles for prod too, but I'm pretty sure it will

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

We can try this, but is there any downside to putting it in deps instead of dev deps @didier? This distinction is still made in some svelte apps, in which case these are deps, not dev deps (the convex cli is a dev dep, but it's the same package as convex/server (compiled into convex functions) and convex/browser (compiled into svelte client and (I hope? with every adapter?) bundled into server bundles). If a developer publishes their package to reuse functionality in lib/ then they'll probably need to move convex back to deps.

I thought there were issues where the server-side code is not bundled in some situations, maybe that's all been resolved as server endpoints are always bundled?

I'd rather not just so we can skip the step where we explain that if you reuse code from this package you need to move it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants