mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
This commit is contained in:
committed by
GitHub
parent
70fc87a7ff
commit
8a7921e5cb
5
.changes/fix-asset-loading-vue-router.md
Normal file
5
.changes/fix-asset-loading-vue-router.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fallback to `index.html` on asset loading so router with history mode works.
|
||||
@@ -427,6 +427,11 @@ impl<P: Params> WindowManager<P> {
|
||||
|
||||
let asset_response = assets
|
||||
.get(&path)
|
||||
.or_else(|| {
|
||||
#[cfg(debug_assertions)]
|
||||
eprintln!("Asset `{}` not found; fallback to index.html", path); // TODO log::error!
|
||||
assets.get("index.html")
|
||||
})
|
||||
.ok_or(crate::Error::AssetNotFound(path))
|
||||
.map(Cow::into_owned);
|
||||
match asset_response {
|
||||
|
||||
Reference in New Issue
Block a user