We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4c9df6 commit 9b1010dCopy full SHA for 9b1010d
.changeset/all-days-nail.md
@@ -0,0 +1,5 @@
1
+---
2
+'@sveltejs/kit': patch
3
4
+
5
+fix: don't treat `$lib/server.ts` or `$lib/server_whatever.ts` as server-only modules, only `$lib/server/**`
packages/kit/src/exports/vite/index.js
@@ -583,7 +583,7 @@ async function kit({ svelte_config }) {
583
normalized === '$env/static/private' ||
584
normalized === '$env/dynamic/private' ||
585
normalized === '$app/server' ||
586
- normalized.startsWith('$lib/server') ||
+ normalized.startsWith('$lib/server/') ||
587
(is_internal && server_only_pattern.test(path.basename(id)));
588
589
if (is_server_only) {
0 commit comments