diff --git a/packages/gatsby/src/redux/actions/public.js b/packages/gatsby/src/redux/actions/public.js index e05a6f1475fa9..7ca245086e409 100644 --- a/packages/gatsby/src/redux/actions/public.js +++ b/packages/gatsby/src/redux/actions/public.js @@ -792,6 +792,11 @@ actions.touchNode = (options: any, plugin?: Plugin) => { nodeId = options } + const node = getNode(nodeId) + if (node && !typeOwners[node.internal.type]) { + typeOwners[node.internal.type] = node.internal.owner + } + return { type: `TOUCH_NODE`, plugin,