MCPcopy
hub / github.com/vercel/next.js / ReactRefreshLoader

Function ReactRefreshLoader

packages/react-refresh-utils/loader.ts:18–32  ·  view source on GitHub ↗
(
  source,
  inputSourceMap
)

Source from the content-addressed store, hash-verified

16)
17
18const ReactRefreshLoader: LoaderDefinition = function ReactRefreshLoader(
19 source,
20 inputSourceMap
21) {
22 this.callback(
23 null,
24 `${source}\n\n;${
25 // Account for commonjs not supporting `import.meta
26 this.resourcePath.endsWith('.cjs')
27 ? commonJsrefreshModuleRuntime
28 : refreshModuleRuntime
29 }`,
30 inputSourceMap
31 )
32}
33
34export default ReactRefreshLoader

Callers

nothing calls this directly

Calls 2

callbackMethod · 0.45
endsWithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…