From d62f5dac4577511ea9dec9b56ab7fc2f5593cbc4 Mon Sep 17 00:00:00 2001 From: ufolux Date: Thu, 12 Oct 2017 15:30:35 +0800 Subject: [PATCH] fix(dev-server): fix for --nolivereload flag to stop reloading (#1200) --- src/dev-server/http-server.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dev-server/http-server.ts b/src/dev-server/http-server.ts index 59a95dd5..b3e3ca85 100644 --- a/src/dev-server/http-server.ts +++ b/src/dev-server/http-server.ts @@ -84,10 +84,9 @@ function serveIndex(req: express.Request, res: express.Response) { fs.readFile(indexFileName, (err, indexHtml) => { if (config.useLiveReload) { indexHtml = injectLiveReloadScript(indexHtml, req.hostname, config.liveReloadPort); + indexHtml = injectNotificationScript(config.rootDir, indexHtml, config.notifyOnConsoleLog, config.notificationPort); } - indexHtml = injectNotificationScript(config.rootDir, indexHtml, config.notifyOnConsoleLog, config.notificationPort); - indexHtml = injectDiagnosticsHtml(config.buildDir, indexHtml); res.set('Content-Type', 'text/html');