ItalyPaleAle / svelte-spa-router

Router for SPAs using Svelte 3
MIT License
1.56k stars 106 forks source link

don't use $ as a prefix in derived #308

Closed gdamjan closed 12 months ago

gdamjan commented 1 year ago

The svelte 5 compiler was complaining about the use of the $ in the variable names:

[vite-plugin-svelte] /home/damjan/projects/irclogs/svelte/node_modules/.pnpm/svelte-spa-router@3.3.0/node_modules/svelte-spa-router/Router.svelte:77:5 The $ prefix is reserved, and cannot be used for variables and imports
file: /home/damjan/projects/irclogs/svelte/node_modules/.pnpm/svelte-spa-router@3.3.0/node_modules/svelte-spa-router/Router.svelte:77:5
error during build:
CompileError: The $ prefix is reserved, and cannot be used for variables and imports

I choose _loc for now, just to see it working. Suggestions welcome.

ItalyPaleAle commented 12 months ago

Thanks for this!