renderer: add HMR
This commit is contained in:
parent
9eed5c04ff
commit
bfdecdbd3c
2 changed files with 9 additions and 0 deletions
7
src/renderer/custom.d.ts
vendored
7
src/renderer/custom.d.ts
vendored
|
@ -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;
|
||||
|
|
|
@ -23,3 +23,5 @@ window.onload = async (): Promise<void> => {
|
|||
|
||||
GameContext.load(renderer);
|
||||
};
|
||||
|
||||
module.hot?.accept();
|
||||
|
|
Reference in a new issue