You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building an application in Tauri using SvelteKit as frontend build tool. In my +layout.svelte, a sidebar is shown when $page.url.pathname is equal to one of the following:
/
/bookings
/prices
and the corresponding item in the sidebar is highlighted with a color when selected.
When using pnpm tauri dev everything looks good, but launching the AppImage after building with pnpm tauri build results in the sidebar not having any item selected. So I decided to debug the AppImage after building with pnpm tauri build --debug and I found out that the URL href is tauri://localhost and not tauri://localhost/ as stated here.
To make it work I had to manually set the url to / inside tauri.conf.json file in the "windows" configuration.
In the Sveltekit docs, I found this and as you can see under base it says:
A root-relative path that must start, but not end with /.
Am I doing something wrong or is this a SvelteKit-related problem? Here's the link to my repo if you wanna check if I'm doing something wrong
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building an application in Tauri using SvelteKit as frontend build tool. In my
+layout.svelte, a sidebar is shown when$page.url.pathnameis equal to one of the following://bookings/pricesand the corresponding item in the sidebar is highlighted with a color when selected.
When using
pnpm tauri deveverything looks good, but launching the AppImage after building withpnpm tauri buildresults in the sidebar not having any item selected. So I decided to debug the AppImage after building withpnpm tauri build --debugand I found out that the URL href istauri://localhostand nottauri://localhost/as stated here.To make it work I had to manually set the
urlto/insidetauri.conf.jsonfile in the"windows"configuration.In the Sveltekit docs, I found this and as you can see under
baseit says:Am I doing something wrong or is this a SvelteKit-related problem?
Here's the link to my repo if you wanna check if I'm doing something wrong
Beta Was this translation helpful? Give feedback.
All reactions