| | import RefreshHelpers from './helpers' |
| |
|
| | declare const __webpack_require__: { |
| | c: Record<string | number, { exports: unknown | (() => Promise<unknown>) }> |
| | } |
| |
|
| | |
| | function getModuleExports(moduleId: string) { |
| | if (typeof moduleId === 'undefined') { |
| | |
| | |
| | |
| | |
| | return {} |
| | } |
| |
|
| | var maybeModule = __webpack_require__.c[moduleId] |
| | if (typeof maybeModule === 'undefined') { |
| | |
| | |
| | |
| | console.warn( |
| | '[React Refresh] Failed to get exports for module: ' + moduleId + '.' |
| | ) |
| | return {} |
| | } |
| |
|
| | var exportsOrPromise = maybeModule.exports |
| | if (typeof Promise !== 'undefined' && exportsOrPromise instanceof Promise) { |
| | return exportsOrPromise.then(function (exports) { |
| | return exports |
| | }) |
| | } |
| | return exportsOrPromise |
| | } |
| |
|
| | function executeRuntime(moduleExports, moduleId, webpackHot) { |
| | RefreshHelpers.registerExportsForReactRefresh(moduleExports, moduleId) |
| |
|
| | if (webpackHot) { |
| | var isHotUpdate = !!webpackHot.data |
| | var prevSignature: unknown[] | null = webpackHot.data?.prevSignature ?? null |
| |
|
| | if (RefreshHelpers.isReactRefreshBoundary(moduleExports)) { |
| | webpackHot.dispose( |
| | |
| | |
| | function hotDisposeCallback(data) { |
| | data.prevSignature = |
| | RefreshHelpers.getRefreshBoundarySignature(moduleExports) |
| | } |
| | ) |
| | webpackHot.accept() |
| |
|
| | |
| | |
| | |
| | if (prevSignature !== null) { |
| | if (isHotUpdate) { |
| | if ( |
| | RefreshHelpers.shouldInvalidateReactRefreshBoundary( |
| | prevSignature, |
| | RefreshHelpers.getRefreshBoundarySignature(moduleExports) |
| | ) |
| | ) { |
| | webpackHot.invalidate() |
| | } else { |
| | RefreshHelpers.scheduleUpdate() |
| | } |
| | } |
| | } |
| | } else { |
| | if (isHotUpdate && prevSignature !== null) { |
| | webpackHot.invalidate() |
| | } |
| | } |
| | } |
| | } |
| |
|
| | |
| | export function refresh(moduleId, webpackHot) { |
| | const currentExports = getModuleExports(moduleId) |
| | const fn = (exports) => { |
| | executeRuntime(exports, moduleId, webpackHot) |
| | } |
| | if (typeof Promise !== 'undefined' && currentExports instanceof Promise) { |
| | currentExports.then(fn) |
| | } else { |
| | fn(currentExports) |
| | } |
| | } |
| |
|
| | export { |
| | register, |
| | createSignatureFunctionForTransform, |
| | } from 'react-refresh/runtime' |
| |
|