We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
{asset}/index.html
index.html
1 parent cf9f6aa commit d22da65Copy full SHA for d22da65
2 files changed
.changes/core-asset-fallback.md
@@ -0,0 +1,5 @@
1
+---
2
+"tauri": patch
3
4
+
5
+Assets will now fallback to `<uri>/index.html` before `/index.html`, allowing anchor links to work as expected.
core/tauri/src/manager.rs
@@ -353,6 +353,7 @@ impl<R: Runtime> WindowManager<R> {
353
354
let asset_response = assets
355
.get(&path.as_str().into())
356
+ .or_else(|| assets.get(&format!("{}/index.html", path.as_str()).into()))
357
.or_else(|| {
358
#[cfg(debug_assertions)]
359
eprintln!("Asset `{}` not found; fallback to index.html", path); // TODO log::error!
0 commit comments