Skip to content

Instantly share code, notes, and snippets.

@ashleyww93
Created November 18, 2024 21:10
Show Gist options
  • Save ashleyww93/12f8350ecc552c1d29ce93271147f325 to your computer and use it in GitHub Desktop.
Save ashleyww93/12f8350ecc552c1d29ce93271147f325 to your computer and use it in GitHub Desktop.
declare global {
// eslint-disable-next-line no-var
var $RefreshReg$: () => void;
// eslint-disable-next-line no-var
var $RefreshSig$: (type: string) => (type: string) => string;
}
if (import.meta.hot) {
self.window = self;
self.$RefreshReg$ = () => {};
self.$RefreshSig$ = () => type => type;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment