-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Disallow import of user-designated server-only modules from the…
… client (#6422) * feat: Failing tests * feat: Dev-only tests * feat: It works...? * changeset * fix: Don't re-resolve $lib * fix: Dumb test * fix: More dumb tests * fix: Even more dumb tests * fix: wut * fix: vscode autoimport is a miserable bully * fix: Workspace? * fix: format * fix: jsconfig => tsconfig * fix: Some svelte-check misery * fix: noEmit * fix: Windows paths are miserable funsuckers * feat: Better documentation of server-only stuff * Revert "feat: Better documentation of server-only stuff" This reverts commit 6b584b8. * feat: Switch to "not in node_modules" logic * broken lockfile, apparently * fix * Update packages/kit/src/exports/vite/utils.js Co-authored-by: Rich Harris <richard.a.harris@gmail.com> * simplify * simplify * lockfile * DRY out, ignore files outside project root * bruh * bruh 2.0 * bruh 3.0 * Update packages/kit/src/exports/vite/utils.js Co-authored-by: Rich Harris <hello@rich-harris.dev> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
- Loading branch information
1 parent
55e9151
commit 0032048
Showing
43 changed files
with
456 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
[breaking] Allow users to designate modules as server-only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const should_explode = 'boom'; |
7 changes: 7 additions & 0 deletions
7
packages/kit/test/apps/dev-only/src/routes/server-only-modules/dynamic-import/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script> | ||
const mod = import('$lib/test.server.js'); | ||
</script> | ||
|
||
{#await mod then resolved} | ||
<p>{resolved.should_explode}</p> | ||
{/await} |
5 changes: 5 additions & 0 deletions
5
packages/kit/test/apps/dev-only/src/routes/server-only-modules/static-import/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script> | ||
import { should_explode } from '$lib/test.server.js'; | ||
</script> | ||
|
||
<p>{should_explode}</p> |
Oops, something went wrong.