use std::process::Command; fn main() { for path in [ // ".svelte-kit", "Cargo.toml", "README.md", // "build", "build.rs", "jsconfig.json", // Excluding because it includes the module `xpin-wasm` // "node_modules", "package.json", "postcss.config.cjs", "src", "static", "svelte.config.js", "tailwind.config.cjs", "vite.config.js", "yarn.lock", ] { println!("cargo:rerun-if-changed=./{path}"); } if !Command::new("yarn") .arg("build") .status() .expect("Could not spawn yarn build") .success() { panic!("yarn build failed"); } }