inertiajs / inertia

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
https://inertiajs.com
MIT License
6.02k stars 405 forks source link

Add new Svelte 5 adapter & playground with Typescript included #1871

Closed jamesst20 closed 1 month ago

jamesst20 commented 1 month ago

May 16: For those interested, have a look into my fork in the meantime: https://www.npmjs.com/~jamesstp20 https://www.npmjs.com/package/@jamesst20/inertia-svelte5 https://github.com/jamesst20/inertia https://github.com/jamesst20/inertia/tree/svelte5-adapter-playground

Original

Unexpected character '@' at error (/Users/james/Projects/inertia-perso/node_modules/svelte/compiler.cjs:14256:16) at Parser.error (/Users/james/Projects/inertia-perso/node_modules/svelte/compiler.cjs:14404:3) at Parser.acorn_error (/Users/james/Projects/inertia-perso/node_modules/svelte/compiler.cjs:14391:8) at read_expression (/Users/james/Projects/inertia-perso/node_modules/svelte/compiler.cjs:9641:10) at mustache (/Users/james/Projects/inertia-perso/node_modules/svelte/compiler.cjs:13965:22) at new Parser (/Users/james/Projects/inertia-perso/node_modules/svelte/compiler.cjs:14352:12) at parse (/Users/james/Projects/inertia-perso/node_modules/svelte/compiler.cjs:14529:17) at parseHtmlx (/Users/james/Projects/inertia-perso/node_modules/svelte2tsx/index.js:1559:22) at processSvelteTemplate (/Users/james/Projects/inertia-perso/node_modules/svelte2tsx/index.js:6497:32) at svelte2tsx (/Users/james/Projects/inertia-perso/node_modules/svelte2tsx/index.js:6714:178)


- PS: With pnpm I could refer from the playground to the adapter like this which is pretty useful `"@inertiajs/svelte5": "workspace:*"`
- **Edit: Required many attempts but I successfully got the build green!**
jamesst20 commented 1 month ago

As stated here https://github.com/inertiajs/inertia/pull/1870

Inertia doesn't want a new Svelte adapter nor want to upgrade to Svelte 5 new syntax, runes, etc.

Closing

Edit: May 12 2024: Latest version of this branch is here: https://github.com/jamesst20/inertia/tree/svelte5-adapter-playground