-
Notifications
You must be signed in to change notification settings - Fork 209
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
base: main
Are you sure you want to change the base?
Conversation
@@ -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 |
There was a problem hiding this comment.
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.
cd my-app && npm install -D convex convex-svelte | |
cd my-app && npm install convex convex-svelte |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
Just some small tweaks that removes reference to "svelte 5 preview" and the old
npm create
CLI in favor of the currentnpx sv create
pattern, as well as a wrong reference ofsrc/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.