svelte-seo
svelte-seo copied to clipboard
Make compatible with Svelte 5
Describe the bug Attempting to use in a Svelte 5 project with runes enabled results in the following error:
✘ [ERROR] node_modules/svelte-seo/index.svelte:3:2 Cannot use `export let` in runes mode — use `$props()` instead [plugin vite-plugin-svelte:optimize-svelte]
node_modules/svelte-seo/index.svelte:3:2:
3 │ export let title = undefined;
╵ ^
The plugin "vite-plugin-svelte:optimize-svelte" was triggered by this import
node_modules/svelte-seo/index.js:1:22:
1 │ import component from "./index.svelte";
╵ ~~~~~~~~~~~~~~~~
To Reproduce Steps to reproduce the behavior:
- Install in a Svelte 5 project
- Use as described in docs
Expected behavior It should work.
Desktop (please complete the following information):
- OS: macOS
- Browser: Chrome
Hi @watzon , Is there a way to check the current svelte version with code? I think the solution is to use an if statement and use different code for svelte 5
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'd like to reopen this as Svelte 5 is officially released now.
@Shackless , I'd take a look at this
@artiebits , can we re-open this issue, I would like to migrate the project to use $props instead of the let
Hi folks, I'm running into issues also with Svelte 5. @artiebits would you mind taking a look and merging the PR?
Apologies for the delay, will review it today @chanmathew @lubiah
New version, 1.7.1, has been published. Please test it and let me know if it doesn’t fix the issue. Thanks everyone!