reload.ts 281 B

123456789101112131415
  1. import initClient from '../initializers/initClient';
  2. function addReload() {
  3. const reload = () => {
  4. chrome.runtime.reload();
  5. };
  6. initClient({
  7. // @ts-expect-error That's because of the dynamic code loading
  8. id: __HMR_ID,
  9. onUpdate: reload,
  10. });
  11. }
  12. addReload();