diff --git a/src/refresh-runtime.js b/src/refresh-runtime.js index 80b962c..cbe001b 100644 --- a/src/refresh-runtime.js +++ b/src/refresh-runtime.js @@ -547,6 +547,12 @@ function isLikelyComponentType(type) { * Plugin utils */ +if (window.$RefreshReg$) { + throw new Error( + "React refresh runtime was loaded twice. Maybe you forgot the base path?", + ); +} + export function getRefreshReg(filename) { return (type, id) => register(type, filename + " " + id); }