ReactRefreshEntry.js 500 B

12345678910111213
  1. const safeThis = require('./utils/safeThis');
  2. if (process.env.NODE_ENV !== 'production' && typeof safeThis !== 'undefined') {
  3. // Only inject the runtime if it hasn't been injected
  4. if (!safeThis.__reactRefreshInjected) {
  5. const RefreshRuntime = require('react-refresh/runtime');
  6. // Inject refresh runtime into global scope
  7. RefreshRuntime.injectIntoGlobalHook(safeThis);
  8. // Mark the runtime as injected to prevent double-injection
  9. safeThis.__reactRefreshInjected = true;
  10. }
  11. }