HMR stub
This commit is contained in:
parent
264db31ac7
commit
04f947e7a4
1 changed files with 11 additions and 0 deletions
11
src/index.ts
11
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();
|
||||
|
|
Loading…
Reference in a new issue