-
-
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.
feature: Replace
sveltekit:*
with valid HTML attributes like `data-…
…sveltekit-*` (#6170) * WIP: Replace `sveltekit:prefetch` with `data-sveltekit-prefetch` at build time. * WIP: Use svelte-preprocess to replace values. Significant progress! PoC works great if run from the user's svelte.config.js, but we need to extend the user config and still make it work. Currently it only works when run with the default svelte config loading. * Improve attribute replacement and make it work even if app devs have custom preprocessing config. Auto-reloading doesn't work though, so that needs to be fixed, along with regex specificity. * WIP: Explore how to combine the svelte config by the user with the options needed by sveltekit. * Improve type definition for `config.preprocess` to match what's used internally. Also allow object configs. * Use API from vite-plugin-svelte to add internal SvelteKit preprocessing Much cleaner solution, which also should be a tiny bit more performant than before. * Cleanup * Breaking: Rename sveltekit:prefetch to data-sveltekit-precfetch * Breaking: Rename sveltekit:noscroll to data-sveltekit-noscroll * Breaking: Rename sveltekit:reload to data-sveltekit-reload * print console error for removed attributes in dev * lint * Update packages/kit/types/index.d.ts * Update packages/kit/types/index.d.ts * Create neat-pots-flash.md Co-authored-by: Rich Harris <hello@rich-harris.dev>
- Loading branch information
1 parent
3d12949
commit 8e9839a
Showing
14 changed files
with
60 additions
and
30 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,6 @@ | ||
--- | ||
"create-svelte": patch | ||
"@sveltejs/kit": patch | ||
--- | ||
|
||
[breaking] Replace `sveltekit:*` with valid HTML attributes like `data-sveltekit-*` |
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
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
2 changes: 1 addition & 1 deletion
2
packages/kit/test/apps/options/source/pages/prefetching/+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 |
---|---|---|
@@ -1 +1 @@ | ||
<a sveltekit:prefetch href="/path-base/prefetching/prefetched">click me</a> | ||
<a data-sveltekit-prefetch href="/path-base/prefetching/prefetched">click me</a> |
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