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