mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Rebuild project after saving file
Fixes https://gitlab.com/soapbox-pub/shakespeare/-/issues/53
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user