diff --git a/crates/mako/src/compiler.rs b/crates/mako/src/compiler.rs index a816824db..960222c8e 100644 --- a/crates/mako/src/compiler.rs +++ b/crates/mako/src/compiler.rs @@ -84,6 +84,7 @@ impl MemoryChunkFileCache { fn write_to_disk>(&self, path: T, content: &[u8]) -> Result<()> { if let Some(root) = &self.root { let path = root.join(path.as_ref()); + fs::create_dir_all(path.parent().unwrap())?; fs::write(path, content)?; } Ok(())