Structured Content 2022: Join our conference to explore fresh perspectives on content and digital experiences →

Coming to Next from Gatsby. Is there a equivalent for testing a build locally to detect for differences?

4 replies
Last updated: Nov 10, 2020

Coming to Next from Gatsby. Is there a equivalent for testing a build locally to detect for differences?
For Gatsby I’d run

gatsby build && gatsby serve

Nov 10, 2020, 7:21 AM

I believe

next build && next start
is the equivalent (CLI docs )

Nov 10, 2020, 7:31 AM

next start
starts the application in production mode. The application should be compiled with
next build
first.
Perfect.

Nov 10, 2020, 7:32 AM

Yes, was writing exactly the same. If you want to test static exports, you’d run

next build && next export
and then serve the contents from your build dir 🙂

Nov 10, 2020, 7:32 AM

I believe

next build && next start
is the equivalent (CLI docs )

Nov 10, 2020, 7:31 AM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.