Make Theseus compilable out of the box again, update Tauri to 1.0.4

Changes made:
- migrate to Vite 3 (Svelte Kit errors out and forces you to migrate)
- bumped unplugin-icons to 0.14.7 (Vite 3 support)
- disable strict-peer-dependencies (changes needed in omorphia - unplugin-icons there requires Vite 2)
- bumped Tauri to 1.0.4 (finally stable!)
- removed useBootstrapper (removed in v1.0.0-rc.5)
- migrated from create_window to setup (removed in v1.0.0-rc.7)
- replaced %svelte% with %sveltekit% (renamed in SvelteKit 1.0.0-next.339)

Notes:
- Vite 3 exposes its dev server on port 5173.
This commit is contained in:
Wuzado
2022-07-16 19:52:30 +02:00
parent b223dc7cba
commit 855604c9e0
11 changed files with 1386 additions and 1230 deletions

View File

@@ -8,12 +8,12 @@ rust-version = "1.57"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "1.0.0-rc.3", features = [] }
tauri-build = { version = "1.0.4", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.0.0-rc.3", features = ["api-all"] }
tauri = { version = "1.0.4", features = ["api-all"] }
[features]
# by default Tauri runs in production mode

View File

@@ -13,8 +13,8 @@ fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![])
.create_window("main", WindowUrl::default(), |win, webview| {
let win = win
.setup(|app| {
let _win = WindowBuilder::new(app, "main", WindowUrl::default())
.title("Modrinth")
.resizable(true)
.decorations(true)
@@ -22,8 +22,9 @@ fn main() {
.inner_size(800.0, 550.0)
.min_inner_size(400.0, 200.0)
.skip_taskbar(false)
.fullscreen(false);
return (win, webview);
.fullscreen(false)
.build()?;
Ok(())
})
.menu(Menu::with_items([
#[cfg(target_os = "macos")]

View File

@@ -4,7 +4,7 @@
},
"build": {
"distDir": "../build",
"devPath": "http://localhost:3000",
"devPath": "http://localhost:5173",
"beforeDevCommand": "pnpm dev:web",
"beforeBuildCommand": "pnpm run build:web"
},
@@ -32,13 +32,11 @@
"shortDescription": "",
"longDescription": "",
"deb": {
"depends": [],
"useBootstrapper": false
"depends": []
},
"macOS": {
"frameworks": [],
"minimumSystemVersion": "",
"useBootstrapper": false,
"exceptionDomain": "",
"signingIdentity": null,
"providerShortName": null,