Skip to content

Commit e70e542

Browse files
[fix] don't watch outDir except generated (#4997)
* [fix] don't watch .svelte-kit directory * try this * fix config name. looked at wrong line in docs * add changeset * try only ignoring types directory * Update .changeset/eight-tomatoes-yawn.md * ignore entire outDir except generated * Update .changeset/eight-tomatoes-yawn.md Co-authored-by: Rich Harris <[email protected]> Co-authored-by: Rich Harris <[email protected]>
1 parent 4a2b7d9 commit e70e542

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/eight-tomatoes-yawn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
[fix] don't watch `outDir`, except for the `generated` directory

packages/kit/src/core/dev/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ export async function dev({ cwd, port, host, https, config }) {
3838
]
3939
},
4040
port: 3000,
41-
strictPort: true
41+
strictPort: true,
42+
watch: {
43+
ignored: [`${config.kit.outDir}/**`, `!${config.kit.outDir}/generated/**`]
44+
}
4245
}
4346
},
4447
await config.kit.vite()

0 commit comments

Comments
 (0)