Cweili / svelte-fa

Tiny FontAwesome component for Svelte
https://cweili.github.io/svelte-fa/
MIT License
398 stars 24 forks source link

Add Svelte 5 runes compatibility #324

Open harryqt opened 6 months ago

harryqt commented 6 months ago

When using

export default {
    compilerOptions: {
       runes: true
    }
};

getting error

  VITE v5.1.3  ready in 431 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
✘ [ERROR] /Users/harry/project5/node_modules/svelte-fa/dist/fa-layers.svelte:4:0 Cannot use `export let` in runes mode — use $props instead [plugin vite-plugin-svelte:optimize-svelte]
notramo commented 5 months ago

Unfortunately, it's currently not possible, as upgrading to Svelte 5 would make it incompatible with Svelte 4 projects. https://github.com/sveltejs/svelte/discussions/10707