MCPcopy
hub / github.com/react/create-react-app / getSourceById

Function getSourceById

packages/react-dev-utils/evalSourceMapMiddleware.js:16–21  ·  view source on GitHub ↗
(server, id)

Source from the content-addressed store, hash-verified

14}
15
16function getSourceById(server, id) {
17 const module = Array.from(server._stats.compilation.modules).find(
18 (m) => server._stats.compilation.chunkGraph.getModuleId(m) == id,
19 );
20 return module.originalSource();
21}
22
23/*
24 * Middleware responsible for retrieving a generated source

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected