learn.svelte.dev
learn.svelte.dev copied to clipboard
Empty `+page.svelte` in `Advanced loading / Invalidation`
https://learn.svelte.dev/tutorial/invalidation
I also stumbled across this while going through the SvelteKit tutorial.
I dug into the codebase and found that this +page.svelte
file comes about as a result of the get_exercise
function including additional directories for traversal when it determines the files for each exercise.
https://github.com/sveltejs/learn.svelte.dev/blob/4e150877cc860208dcf5d68d9ccd138bd5195a77/src/lib/server/content.js#L139C1-L139C59
Specifically, it's the following blank +page.svelte
file, part of what appears to be "common" tutorial files.
https://github.com/sveltejs/learn.svelte.dev/blob/4e150877cc860208dcf5d68d9ccd138bd5195a77/content/tutorial/common/src/routes/%2Bpage.svelte
While I could push a changeset to redact this, I'm unsure whether there are any exercises that legitimately depend on this blank file being created.
However, one might think that if an exercise needs a src/routes/+page.svelte
that it defines the file as part of the exercise content instead of relying on this fallback.
If any maintainers want to chime in, I'd be happy to submit a patch.