From 587d08239ac865f65e25875cabdd4c6a879e9e7f Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Fri, 18 Mar 2022 20:16:58 +0100 Subject: [PATCH] fix(core): update --- ts/tswatch.classes.tswatch.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ts/tswatch.classes.tswatch.ts b/ts/tswatch.classes.tswatch.ts index cce21e3..a2e9063 100644 --- a/ts/tswatch.classes.tswatch.ts +++ b/ts/tswatch.classes.tswatch.ts @@ -17,6 +17,8 @@ export class TsWatch { * starts the TsWatch instance */ public async start() { + const tsbundle = new plugins.tsbundle.TsBundle(); + const htmlHandler = new plugins.tsbundle.HtmlHandler(); switch (this.watchmode) { case 'test': this.watcherMap.add( @@ -46,8 +48,7 @@ export class TsWatch { serveDir: plugins.path.join(paths.cwd, './dist_watch/'), port: 3002, }); - const tsbundle = new plugins.tsbundle.TsBundle(); - const htmlHandler = new plugins.tsbundle.HtmlHandler(); + const bundleAndReload = async () => { await tsbundle.build(paths.cwd, './html/index.ts', './dist_watch/bundle.js', { bundler: 'esbuild'