From 04f947e7a4fd29f07a2702aebfa11bb2fe9b143f Mon Sep 17 00:00:00 2001 From: Tangent Wantwight Date: Sat, 4 Apr 2020 21:48:50 -0400 Subject: [PATCH] HMR stub --- src/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/index.ts b/src/index.ts index 0971c53..84f2efb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,17 @@ import { Select } from "./Applet/Init"; import { BindTests } from "./Ecs/test"; import { Main } from "./Game/Main"; +/* // Hot Module Reloading stub, if that's viable + * declare const module: any; + * if(module.hot) { + * const gen = module.hot.data?.gen ?? 0; + * module.hot.accept(); + * module.hot.dispose((data: any) => { + * data.gen = gen + 1; + * }); + * } + */ + Select("#GameCanvas").forEachCanvas((c, cx, keys) => new Main(c, cx, keys)); BindTests();