summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2020-02-22 21:27:32 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2020-02-23 11:10:56 +0100
commitbfdecdbd3ca5e1b2c231da4609cb0a2fc3f31e88 (patch)
treeb2bcb5a715417328eda4262e6632606305e708ea /src
parent9eed5c04fff403ef6a7d9ad3ca1fe8628510b9a6 (diff)
downloadrpgedit-bfdecdbd3ca5e1b2c231da4609cb0a2fc3f31e88.tar
rpgedit-bfdecdbd3ca5e1b2c231da4609cb0a2fc3f31e88.zip
renderer: add HMR
Diffstat (limited to 'src')
-rw-r--r--src/renderer/custom.d.ts7
-rw-r--r--src/renderer/index.ts2
2 files changed, 9 insertions, 0 deletions
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<void> => {
GameContext.load(renderer);
};
+
+module.hot?.accept();