packages/hmr-plugin/src/utils/internals.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { HmrRuntime } from '../symbols';

declare const window: any;

export function setHmrReloadedTo(value: boolean): void {
  if (window[HmrRuntime.Status]) {
    window[HmrRuntime.Status].hmrReloaded = value;
  }
}

export function markApplicationAsHmrReloaded(): void {
  window[HmrRuntime.Status] = window[HmrRuntime.Status] || {
    hmrReloaded: false
  };
}