Run gatsby build and expose events from IPC
$ yarn add gatsby-ipc
Add a script
{
"scripts": {
"gatsby-ipc": "gatsby-ipc"
}
}
Run yarn build it will spawn the gatsby build command with ipc
gatsby-ipc build
Run yarn preview it will spawn the gatsby develop command with ipc
gatsby-ipc develop