Join our next Developer Virtual Meetup – Live Q&A, Project Showcase, Swag raffle, and more 🔥

Changing build path and adding build command to package.json

5 replies
Last updated: May 11, 2020
One more question: Are you able to change the dist path for the build? I'm using a yarn/lerna monorepo and would like to point it to the root dist folder - by default it is building to the package folder. And wanted to make a suggestion to add the build command to the package.json when generated with
sanity init
. I was pleasantly surprised that it worked with the existing monorepo out of the box.
May 11, 2020, 5:05 PM
Doesn't seem to be a config option for it, but you can do
sanity build <output-folder>
, I believe
May 11, 2020, 5:48 PM
I'll give it a try. Didn't see anything mentioned in
sanity help build
either.
May 11, 2020, 6:01 PM
omg
usage: sanity build [OUTPUT_DIR]
May 11, 2020, 6:02 PM
Or I'm just blind.
May 11, 2020, 6:02 PM
Yep, that worked!
May 11, 2020, 6:04 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?