fix(core): update

This commit is contained in:
Philipp Kunz 2022-03-18 20:32:26 +01:00
parent 8d7ab769e1
commit 073f978626

View File

@ -49,7 +49,7 @@ export class TsWatch {
port: 3002, port: 3002,
}); });
const bundleAndReload = async () => { const bundleAndReloadElement = async () => {
await tsbundle.build(paths.cwd, './html/index.ts', './dist_watch/bundle.js', { await tsbundle.build(paths.cwd, './html/index.ts', './dist_watch/bundle.js', {
bundler: 'esbuild' bundler: 'esbuild'
}); });
@ -59,7 +59,7 @@ export class TsWatch {
new Watcher({ new Watcher({
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'), filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
functionToCall: async () => { functionToCall: async () => {
await bundleAndReload(); await bundleAndReloadElement();
}, },
timeout: null, timeout: null,
}) })
@ -78,7 +78,7 @@ export class TsWatch {
'./dist_watch/index.html' './dist_watch/index.html'
) )
); );
await bundleAndReload(); await bundleAndReloadElement();
}, },
timeout: null, timeout: null,
}) })
@ -99,7 +99,7 @@ export class TsWatch {
timeout: null, timeout: null,
}) })
); );
const bundleAndReload2 = async () => { const bundleAndReloadWebsite = async () => {
await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_serve/bundle.js', { await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_serve/bundle.js', {
bundler: 'esbuild' bundler: 'esbuild'
}); });
@ -108,7 +108,7 @@ export class TsWatch {
new Watcher({ new Watcher({
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'), filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
functionToCall: async () => { functionToCall: async () => {
await bundleAndReload2(); await bundleAndReloadWebsite();
}, },
timeout: null, timeout: null,
}) })
@ -127,7 +127,7 @@ export class TsWatch {
'./dist_watch/index.html' './dist_watch/index.html'
) )
); );
await bundleAndReload2(); await bundleAndReloadWebsite();
}, },
timeout: null, timeout: null,
}) })