mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
infer mode only compiles component/hook decls
Forks the logic from Program.ts, letting us customize what gets compiled.
This commit is contained in:
@@ -374,7 +374,7 @@ export function compileProgram(
|
||||
}
|
||||
}
|
||||
|
||||
export function shouldVisitNode(fn: BabelFn, pass: CompilerPass): boolean {
|
||||
function shouldVisitNode(fn: BabelFn, pass: CompilerPass): boolean {
|
||||
if (hasUseMemoCacheCall(fn)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -437,6 +437,7 @@ const skipFilter = new Set([
|
||||
"forest/forest-object-type-valid.flow",
|
||||
"forest/forest-partial-reassignment-type-annotation.flow",
|
||||
"forest/todo-forest-phi-type-unused-initializer.flow",
|
||||
"forest/forest-hook.flow",
|
||||
|
||||
// TODO: we probably want to always skip these
|
||||
"rules-of-hooks/rules-of-hooks-0592bd574811",
|
||||
|
||||
Reference in New Issue
Block a user