Next.js Discord

Discord Forum

Exclude page from build

Answered
Argentine hake posted this in #help-forum
Open in Discord
Argentine hakeOP
I am using Sanity Studio and when I build I got this error : studio/[[...index]]/page.jsx doesn't have a root layout. To fix this error, make sure every page has a root layout.
Is it possible to exclude a specific page for the production build but let it available in development ?
Answered by joulev
Remove the file before running build. Or put it to .gitignore so it doesn’t get pushed to git and your CI/CD won’t see it
View full answer

1 Reply