Skip to content

Commit

Permalink
fix: websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
isaurssaurav committed Oct 15, 2023
1 parent 1bf4717 commit 72e6a06
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,9 @@ const hotReloadExtension = (options: hotReloadExtensionOptions): Plugin => {
chalkLogger.red('Load extension to browser...');
return;
}

// buffer time
setTimeout(() => {
ws?.send(Message.FILE_CHANGE);
if (log) chalkLogger.green('Extension Reloaded...');
}, 500);
// TODO BUG: when user triggers watch before previous build is completed, the extension crashes
ws?.send(Message.FILE_CHANGE);
if (log) chalkLogger.green('Extension Reloaded...');
}
};
};
Expand Down

0 comments on commit 72e6a06

Please sign in to comment.