createClientReferencesForExports() — react Function Reference
Architecture documentation for the createClientReferencesForExports() function in WebpackMock.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 81b21050_657b_48bc_1caa_60fe1e9ff070["createClientReferencesForExports()"] 1afccb37_9b08_bb4a_36b4_9341b4b1f2d3["WebpackMock.js"] 81b21050_657b_48bc_1caa_60fe1e9ff070 -->|defined in| 1afccb37_9b08_bb4a_36b4_9341b4b1f2d3 style 81b21050_657b_48bc_1caa_60fe1e9ff070 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-server-dom-webpack/src/__tests__/utils/WebpackMock.js lines 145–175
const createClientReferencesForExports = ({exports, async}) => {
webpackClientMap[path] = {
id: idx,
chunks,
name: '*',
async: true,
};
if (options.forceClientModuleProxy) {
return createClientModuleProxy(path);
}
if (typeof exports === 'object') {
const references = {};
for (const name in exports) {
const id = path + '#' + name;
webpackClientMap[path + '#' + name] = {
id: idx,
chunks,
name: name,
async,
};
references[name] = registerClientReference(() => {}, id, name);
}
return references;
}
return registerClientReference(() => {}, path, '*');
};
Domain
Subdomains
Source
Frequently Asked Questions
What does createClientReferencesForExports() do?
createClientReferencesForExports() is a function in the react codebase, defined in packages/react-server-dom-webpack/src/__tests__/utils/WebpackMock.js.
Where is createClientReferencesForExports() defined?
createClientReferencesForExports() is defined in packages/react-server-dom-webpack/src/__tests__/utils/WebpackMock.js at line 145.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free