-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Disallow import of user-designated server-only modules from the client #6422
Conversation
🦋 Changeset detectedLatest commit: bfb886c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hah well, I've broken things. Will fix later. |
implemented in 2f16ba2 |
👍🏼 Really useful addition to Svelte Kit. I wonder if this could be extended to disallow client import of modules from a configured path, e.g., |
I think if we were going to do that, it would have to be from one specific location, i.e. |
Agree. I welcome the utility in the I'm actually not sure if |
If this becomes an option within the |
From a configuration standpoint we could provide it in |
@accuser @dummdidumm Implemented in #6623 |
Allow users to take advantage of the same dev- and run-time graph analysis that
$env/*/private
modules benefit from. Any module named*.server.*
will be disallowed for client import. This does not include modules insidenode_modules
.TODO:
lib
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0