From bfdecdbd3ca5e1b2c231da4609cb0a2fc3f31e88 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 22 Feb 2020 21:27:32 +0100 Subject: renderer: add HMR --- src/renderer/custom.d.ts | 7 +++++++ src/renderer/index.ts | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src/renderer') diff --git a/src/renderer/custom.d.ts b/src/renderer/custom.d.ts index 898bbc3..c9a88b8 100644 --- a/src/renderer/custom.d.ts +++ b/src/renderer/custom.d.ts @@ -1,3 +1,10 @@ +declare namespace NodeJS { + interface Module { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + hot: any; + } +} + declare module '*.vs' { const content: string; export default content; diff --git a/src/renderer/index.ts b/src/renderer/index.ts index 16f18d1..490dbef 100644 --- a/src/renderer/index.ts +++ b/src/renderer/index.ts @@ -23,3 +23,5 @@ window.onload = async (): Promise => { GameContext.load(renderer); }; + +module.hot?.accept(); -- cgit v1.2.3