We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6edb50 commit f579b37Copy full SHA for f579b37
packages/common/refresh-utils.ts
@@ -10,9 +10,12 @@ const refreshContentRE = /\$RefreshReg\$\(/
10
export const preambleCode = `import { injectIntoGlobalHook } from "__BASE__${runtimePublicPath.slice(
11
1,
12
)}";
13
+if (!window.__vite_plugin_react_preamble_installed__) {
14
injectIntoGlobalHook(window);
15
window.$RefreshReg$ = () => {};
16
window.$RefreshSig$ = () => (type) => type;
17
+}
18
+window.__vite_plugin_react_preamble_installed__ = true;
19
`
20
21
export const getPreambleCode = (base: string): string =>
0 commit comments