Closed StoicDeveloper closed 2 months ago
Any update on this?
This is fixed on main, it can be releases in another rc release
This should be solved with Tauri v2 as the import is now @tauri-apps/api/core
.
Will be releasing Tauri v2 support in the coming days once a few minor bugs are sorted out.
Currently tauri-specta generates a binding.ts file with the following line:
import { invoke as TAURI_INVOKE } from "@tauri-apps/api";
When building the app
cargo tauri dev
using the NextJS framework, prerendering the app pages gives the following error:ReferenceError: window is not defined
If the import is manually changed to
import { invoke as TAURI_INVOKE } from "@tauri-apps/api/tauri";
Then building the app works fine.