invokeCompiler() — react Function Reference
Architecture documentation for the invokeCompiler() function in compilation.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 1796e62b_c805_a4b0_f7fd_34e2bc4068da["invokeCompiler()"] 9ba26589_c539_da05_fcd2_2ca7851645ba["compilation.ts"] 1796e62b_c805_a4b0_f7fd_34e2bc4068da -->|defined in| 9ba26589_c539_da05_fcd2_2ca7851645ba 01f84d19_40f4_ddcb_bf42_a422f8d05d88["compile()"] 01f84d19_40f4_ddcb_bf42_a422f8d05d88 -->|calls| 1796e62b_c805_a4b0_f7fd_34e2bc4068da ecf50617_cf5c_10d3_0c2f_53de955b9e2a["parseInput()"] 1796e62b_c805_a4b0_f7fd_34e2bc4068da -->|calls| ecf50617_cf5c_10d3_0c2f_53de955b9e2a style 1796e62b_c805_a4b0_f7fd_34e2bc4068da fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/apps/playground/lib/compilation.ts lines 54–79
function invokeCompiler(
source: string,
language: 'flow' | 'typescript',
options: PluginOptions,
): CompilerTransformOutput {
const ast = parseInput(source, language);
let result = transformFromAstSync(ast, source, {
filename: '_playgroundFile.js',
highlightCode: false,
retainLines: true,
plugins: [[BabelPluginReactCompiler, options]],
ast: true,
sourceType: 'module',
configFile: false,
sourceMaps: true,
babelrc: false,
});
if (result?.ast == null || result?.code == null || result?.map == null) {
throw new Error('Expected successful compilation');
}
return {
code: result.code,
sourceMaps: result.map,
language,
};
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does invokeCompiler() do?
invokeCompiler() is a function in the react codebase, defined in compiler/apps/playground/lib/compilation.ts.
Where is invokeCompiler() defined?
invokeCompiler() is defined in compiler/apps/playground/lib/compilation.ts at line 54.
What does invokeCompiler() call?
invokeCompiler() calls 1 function(s): parseInput.
What calls invokeCompiler()?
invokeCompiler() is called by 1 function(s): compile.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free