Skip to content

Commit

Permalink
fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
archeoss committed Jan 23, 2024
1 parent ce2853f commit f361e3a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ pub fn build_frontend() {
// #[cfg(not(debug_assertions))]
shell("yarn");

let mut project_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
project_dir.push(FRONTEND_DIR);
std::fs::remove_dir_all(project_dir);

// Only build frontend when building a release
// #[cfg(not(debug_assertions))]
shell("yarn build");
Expand All @@ -85,6 +89,8 @@ pub fn move_frontend() {
target.pop();
target.push(FRONTEND_DIR);

// Note: sometimes, build can fail if the previous build is still present
// What a lovely language....
let mut project_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
project_dir.push(FRONTEND_DIR);

Expand Down

0 comments on commit f361e3a

Please sign in to comment.