SvelteKit's vite-plugin-sveltekit-guard blocks importing any file whose path contains 'server' into client-side code, not just files under $lib/server/. A file named $lib/server-config.ts triggers the guard with error: 'Cannot import $lib/server-config.ts into client-side code'. The guard matches on the path segment, not the directory convention documented in SvelteKit docs.
Rename the file to avoid 'server' in the path. For example, $lib/server-config.ts → $lib/api-servers.ts. The SvelteKit guard checks path segments for 'server', not just the $lib/server/ directory convention. This is more aggressive than the documentation suggests.