sliftutils 1.2.10 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builders/hotReload.ts +0 -7
- package/package.json +1 -1
package/builders/hotReload.ts
CHANGED
|
@@ -85,14 +85,7 @@ function chromeExtensionBackgroundHotReload(port = DEFAULT_WATCH_PORT) {
|
|
|
85
85
|
function chromeExtensionContentScriptHotReload() {
|
|
86
86
|
let port = chrome.runtime.connect({ name: "hotReload" });
|
|
87
87
|
|
|
88
|
-
let startTime = Date.now();
|
|
89
|
-
|
|
90
88
|
port.onDisconnect.addListener(() => {
|
|
91
|
-
let timeToFail = Date.now() - startTime;
|
|
92
|
-
if (timeToFail < 3000) {
|
|
93
|
-
console.warn("[Hot Reload] Could not connect to background script. Make sure the background script calls enableHotReloading().");
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
89
|
console.log("[Hot Reload] Extension reloaded, refreshing page...");
|
|
97
90
|
window.location.reload();
|
|
98
91
|
});
|