Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Removing Sanity Studio from Next.js build for faster load times

2 replies
Last updated: Jun 14, 2023
How can I remove the Sanity Studio from my next.js build? It has a huge first load js size.
Jun 14, 2023, 10:04 PM
You’d just have to remove it from your code, then use npm to uninstall its modules.
Jun 14, 2023, 10:18 PM
If this is about your build, one thing that might work (but untested) is to add the Studio directory to your
exclude
array in tsconfig.json.
Jun 14, 2023, 10:26 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?