feat(webpack): emit hrm boot status

This commit is contained in:
Igor Randjelovic
2022-04-29 17:50:12 +02:00
parent 770ac794fd
commit 65ae614bbf

View File

@ -19,7 +19,7 @@ if (module.hot) {
const setStatus = ( const setStatus = (
hash: string, hash: string,
status: 'success' | 'failure', status: 'success' | 'failure' | 'boot',
message?: string, message?: string,
...info: any ...info: any
): boolean => { ): boolean => {
@ -116,6 +116,11 @@ if (module.hot) {
} }
await checkAndApply(); await checkAndApply();
originalOnLiveSync(); await originalOnLiveSync();
if (!global.hmrBootEmitted) {
global.hmrBootEmitted = true;
setStatus(hash, 'boot', 'HMR Enabled - waiting for changes...');
}
}; };
} }