Skip to content

Commit 6e39c12

Browse files
author
Rich Harris
committed
mention vite, explain config options
1 parent 8ee81dc commit 6e39c12

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

content/tutorial/03-sveltekit/01-concepts/01-introducing-sveltekit/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ On the right, in the file tree viewer, you'll see a handful of files that Svelte
3030
3131
`svelte.config.js` contains your project configuration. We don't need to worry about this file for now, but if you're curious, [visit the documentation](https://kit.svelte.dev/docs/configuration).
3232

33+
`vite.config.js` contains the [Vite](https://vitejs.dev/) configuration. Because SvelteKit uses Vite, you can use [Vite features](https://vitejs.dev/guide/features.html) like hot module replacement, TypeScript support, static asset handling and so on.
34+
3335
`src` is where your app's source code goes. `src/app.html` is your page template (SvelteKit replaces the `%sveltekit.head%` and `%sveltekit.body%` as appropriate), and `src/routes` defines the [routes](/tutorial/pages) of your app.
3436

3537
Finally, `static` contains any assets (like a `favicon.png` or a `robots.txt`) that should be included when your app is deployed.

content/tutorial/common/svelte.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const config = {
99

1010
vitePlugin: {
1111
experimental: {
12+
// This feature enables compile-time warnings to be
13+
// visible in the learn.svelte.dev editor
1214
sendWarningsToBrowser: true
1315
}
1416
}

content/tutorial/common/vite.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { defineConfig } from 'vite';
33

44
export default defineConfig({
55
plugins: [sveltekit()],
6+
7+
// Normally this would be unnecessary, but we
8+
// need it for learn.svelte.dev
69
server: {
710
fs: {
811
strict: false

0 commit comments

Comments
 (0)