diff --git a/package.json b/package.json index cfdb4fa0..c03d3799 100644 --- a/package.json +++ b/package.json @@ -355,7 +355,7 @@ "vsls": "^0.3.967" }, "announcement": { - "onVersion": "5.7.5", - "message": "[NEW] LiveServer@5.7.5: Changed extension activationEvents to onStartupFinished." + "onVersion": "5.7.8", + "message": "[NEW] LiveServer@5.7.8: Improved activation load time" } } diff --git a/src/LiveServerHelper.ts b/src/LiveServerHelper.ts index dbac3d1f..e42241f3 100644 --- a/src/LiveServerHelper.ts +++ b/src/LiveServerHelper.ts @@ -1,20 +1,18 @@ 'use strict'; -const liveServer = require('live-server'); -const httpShutdown = require('http-shutdown'); export class LiveServerHelper { static StartServer(params, callback) { setTimeout(() => { try { - let ServerInstance = liveServer.start(params); + let ServerInstance = require('live-server').start(params); setTimeout(() => { if (!ServerInstance._connectionKey) { return callback({}); } - httpShutdown(ServerInstance); + require('http-shutdown')(ServerInstance); return callback(ServerInstance); }, 1000); @@ -34,7 +32,7 @@ export class LiveServerHelper { // callback(); /*only Working first time, Unknown Bug*/ }); LiveServerInstance.close(); - liveServer.shutdown(); + // liveServer.shutdown(); setTimeout(() => { callback(); }, 1000); } } \ No newline at end of file