Rebuild project after saving file

Fixes https://gitlab.com/soapbox-pub/shakespeare/-/issues/53
This commit is contained in:
Alex Gleason committed 2025-09-29 17:51:25 -05:00
1 parent 795eaa50c2
commit 5fa16115fd
1 file changed
+6
@@ -497,6 +497,12 @@ export function PreviewPane({ projectId, activeTab, onToggleView, projectName, o
try {
await fs.writeFile(`/projects/${projectId}/${selectedFile}`, content);
setFileContent(content);
// Automatically trigger a rebuild after saving a file
if (isPreviewable) {
console.log('File saved, triggering rebuild...');
handleBuildProject();
}
} catch (error) {
console.error('Failed to save file:', error);
}