mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-11 05:57:07 +03:00
fix(tauri) properly rebuild when tauri conf changes (#787)
This commit is contained in:
parent
6a179997b4
commit
18452edd98
5
.changes/tauri-conf-changes.md
Normal file
5
.changes/tauri-conf-changes.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-api": patch
|
||||
---
|
||||
|
||||
Fixes the config reloading when tauri.conf.json changes.
|
@ -14,6 +14,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
|
||||
match env::var_os("TAURI_CONFIG") {
|
||||
Some(tauri_config) => {
|
||||
println!("cargo:rerun-if-env-changed=TAURI_CONFIG");
|
||||
let tauri_config_string = tauri_config.into_string().unwrap();
|
||||
write!(config_file, "{}", tauri_config_string)?;
|
||||
}
|
||||
|
@ -78,12 +78,6 @@ pub fn main() {
|
||||
}
|
||||
|
||||
fn shared() {
|
||||
if let Some(tauri_dir) = std::env::var_os("TAURI_DIR") {
|
||||
let mut tauri_path = std::path::PathBuf::from(tauri_dir);
|
||||
tauri_path.push("tauri.conf.json");
|
||||
println!("cargo:rerun-if-changed={:?}", tauri_path);
|
||||
}
|
||||
|
||||
setup_env_aliases();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user