I am currently running a Gatsby site with NetlifyCMS and have been looking for a workaround so I don’t have to run gatsby clean every time after changes have been made in the CMS => meaning removing the gatsby clean command from the build command.
If I don’t gatsby clean, the build crashes when I change any markdown content.
Because of the large number of images on my site, having to rebuild every time from scratch takes a lot longer than it should.
The problem seems to be that images cannot be found after changes have been made to the md file resulting in “Cannot read property ‘childImageSharp’ of null”. So far only removing the cache and public folder seems to resolve the issue, but this comes with long build times.
Even the gatsby-netlify-cms-starter uses the gatsby clean command before running npm build.
Any possible workaround for this?