Skip to content

[Bug]: Svelte docs are outdated #2642

@benmccann

Description

@benmccann

Link to the documentation page or resource

https://strapi.io/integrations/svelte-cms

Describe the bug

npm create svelte@latest my-svelte-app should be changed to npx sv create my-svelte-app. See https://svelte.dev/docs/cli/overview

Should be updated to Svelte 5. Remove references to $:. E.g. $: formattedDate = new Date(article.attributes.publishedAt).toLocaleDateString(); should be const formattedDate = $derived(new Date(article.attributes.publishedAt).toLocaleDateString());

load function should be in its own +page.ts file. See https://svelte.dev/docs/kit/load

Additional context

No response

Suggested improvements or fixes

No response

Related issue(s)/PR(s)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions