#Have path resolve the index.html in the path instead of directly pointing to index.html...

38 messages · Page 1 of 1 (latest)

stiff copper
#

So - maybe I'm being dumb, but the way I've got Astro configured, is that if you create an 'index.html' in a path, it resvolves it when you link to the path...

IE if you have /people/index.html, you can link to /people and it'll return the /people/index.html page.

Tauri doesn't seem to support this... it seems like it just returns my root index.html (which seems to be the behavior for 404s)...

Is there a way to have it resolve the index.html inside the path without linking directly to it?

stark sigil
#

IE if you have /people/index.html, you can link to /people and it'll return the /people/index.html page.
That should work actually

#

if you create a debug build with the --debug build (output in target/debug/) and start that compiled app from inside the terminal you see logs of which files tauri tries to find

stiff copper
#

well its funny because if I inspect the app and manually rewrite "/person" to "/person/index.html" it works fine.

stiff copper
stark sigil
#

npm run tauri build -- --debug (cause npm is a bit special)

stiff copper
#

trying this now

#

hm

#

So I see the debug build in the /src-tauri/target/debug folder... I run the app... but I don't see the log file?

#

or rather I don't see the logs in the terminal

stark sigil
#

that's weird

#

which os are you on?

stiff copper
#

MacOS

stark sigil
#

okay one sec let me get my macbook

stiff copper
#

Sonoma 14.5 to be specific

#

that's what I see to be specific

stark sigil
stiff copper
#

k - rebuilding now...

#

Btw - thanks for taking the time to help!

#

fn main() { cargo add pretty_env_logger presto_client_lib::run() }

#

correct?

#

(I'm new to rust, part of the reason I'm trying to get this going...)

stark sigil
#

the first one is something to run in your terminal

#

you probably have to cd into the src-tauri dir for it to work

#

and after you ran that, this: ```rs
fn main() {
pretty_env_logger::init();
presto_client_lib::run()
}

stiff copper
#

k - I see pretty_env_logger = "0.5.0" in Cargo.toml

#

hmm...

#

let me try this in a different terminal window.

#

still not seeing any logs

#

not getting anything when navigating but I did get a debug msg:
RemoteLayerTreeDrawingAreaProxyMac::scheduleDisplayLink(): page has no displayID

stiff copper
#

I'm suspecting this might be user error on my part... trying to configure the frontendDist path to look where my build is being generated rather than manually copying it.

#

but it's strange because even though that path is valid it can't seem to find it...

stark sigil
stiff copper
#

so... need a quick sanity check:
if /Documents/Development/presto/presto-client/src-tauri/tauri.conf.json is in that location.... and my index.html and frontend are in /Documents/Development/presto/presto-web/dist

shouldn't "frontendDist": "../../presto-web/dist" be correct in the tauri.conf.json?

#

(my hypothesis is that maybe the other html files aren't getting into the build)

stiff copper
#

pretty sure that was the issue... Not sure why it didn't like me seperating the builds out ... but combining both my astro and tauri build into the same folder seemed to fix the issue...

#

Thank you for trying to help me, @stark sigil !

stark sigil
#

The exact location shouldn't really matter as long as all files are in that dist dir 🤔