-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
docs: clarify what you can build with SvelteKit #15461
base: main
Are you sure you want to change the base?
Conversation
|
|
The deploy is failing, but is sure looks like its caching an old version and I'm not sure how to address that as I've tried redeploying already. I would say we should just merge this if we're happy with the text and if it's still an issue in the |
@@ -15,7 +15,7 @@ Don't worry if you don't know Svelte yet! You can ignore all the nice features S | |||
|
|||
## Alternatives to SvelteKit | |||
|
|||
You can also use Svelte directly with Vite by running `npm create vite@latest` and selecting the `svelte` option. With this, `npm run build` will generate HTML, JS and CSS files inside the `dist` directory using [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte). In most cases, you will probably need to [choose a routing library](faq#Is-there-a-router) as well. | |||
If you're building a [single page app (SPA)](../kit/glossary#SPA), you can [use SvelteKit](../kit/single-page-apps), or you can use Svelte directly with Vite. To create a vanilla Vite project, run `npm create vite@latest` and selecting the `svelte` option. With this, `npm run build` will generate HTML, JS and CSS files inside the `dist` directory using [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte). In most cases, you will probably need to [choose a routing library](faq#Is-there-a-router) as well. |
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.
what about making it a callout note? The current change makes it sound like vanilla Vite is only valid if you're doing SPA.
If you're building a [single page app (SPA)](../kit/glossary#SPA), you can [use SvelteKit](../kit/single-page-apps), or you can use Svelte directly with Vite. To create a vanilla Vite project, run `npm create vite@latest` and selecting the `svelte` option. With this, `npm run build` will generate HTML, JS and CSS files inside the `dist` directory using [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte). In most cases, you will probably need to [choose a routing library](faq#Is-there-a-router) as well. | |
You can also use Svelte directly with Vite by running `npm create vite@latest` and selecting the `svelte` option. With this, `npm run build` will generate HTML, JS and CSS files inside the `dist` directory using [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte). In most cases, you will probably need to [choose a routing library](faq#Is-there-a-router) as well. | |
>[!NOTE] If you only choose vanilla Vite because you're building a [single page app (SPA)](../kit/glossary#SPA), you can also [use SvelteKit](../kit/single-page-apps) |
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.
The current change makes it sound like vanilla Vite is only valid if you're doing SPA.
I think that's basically all vanilla Vite is used for. It's too complex to do SSR without a framework. Was there something else you had in mind that people might build?
I've seen a really depressing number of people saying you can't build a SPA with SvelteKit. Some portion of that may be due to sveltejs/kit#12580, which I'm working on, but I also think some of it is just ignorance or confusion. I'm hoping this change will help on the education side