Recently in my application i needed to know to plaftform where it is runing on, so i can enable/disable some features, but after installing both crate and node module i get an error, much like this one on this thread https://github.com/tauri-apps/plugins-workspace/issues/719
I see comments saying in mac OS works fine (im on windows) and i've also seen this code
impl InitJavascript<'_> {
fn new() -> Self {
Self {
#[cfg(windows)]
eol: "\r\n",
#[cfg(not(windows))]
eol: "\n",
os_type: crate::type_().to_string(),
platform: crate::platform(),
family: crate::family(),
version: crate::version().to_string(),
arch: crate::arch(),
exe_extension: crate::exe_extension(),
}
}
}
Wich seems to let expose thse on windows? But in init.js of the os-plugin it tries to define Object.defineProperty(window, '__TAURI_OS_PLUGIN_INTERNALS__'). But this object is not defined in the browser window at all. Only indow._TAURI_INTERNALS is...
Can anyne help wwith this?
Thnx in advance