server-esm: Fix a few more straightforward imports

This commit is contained in:
Elian Doran
2024-07-18 23:48:14 +03:00
parent 508b5e3c69
commit 93a0782009
4 changed files with 18 additions and 4 deletions

View File

@@ -14,8 +14,8 @@ import { IncomingMessage, Server } from 'http';
import { EntityChange } from './entity_changes_interface';
if (env.isDev()) {
const chokidar = require('chokidar');
const debounce = require('debounce');
const chokidar = (await import("chokidar")).default;
const debounce = (await import("debounce")).default;
const debouncedReloadFrontend = debounce(() => reloadFrontend("source code change"), 200);
chokidar
.watch('src/public')