-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Labels
help wantedPRs welcomed. The implementation details are unlikely to cause debatePRs welcomed. The implementation details are unlikely to cause debate
Description
Describe the bug
Importing the file $lib/server_manager.svelte.ts into client pages triggered error
[vite] Internal server error: Cannot import $lib/server_manager.svelte.ts into client-side code. This could leak sensitive information.
This is super frustrating. Why did server_manager made SvelteKit believe it was an server only file?
Reproduction
Create a new SvelteKit project. Create an file server_manager.svelte.ts in /src/lib. Import anything in $lib/server_manager.svelte.ts into client codes.
Logs
System Info
System:
OS: Linux 5.15 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900K
Memory: 53.39 GB / 62.58 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 22.17.1 - /opt/node/bin/node
npm: 10.9.2 - /opt/node/bin/npmSeverity
annoyance
Additional Information
No response
Metadata
Metadata
Assignees
Labels
help wantedPRs welcomed. The implementation details are unlikely to cause debatePRs welcomed. The implementation details are unlikely to cause debate