

























We're releasing v6 of the sanity package this week, bringing Vite 8 to the Studio's development tooling.
The Vite upgrade brings great improvements for builds. Across the studios we've measured, median build times droped around 4.8×. You also get smaller bundles from improved tree shaking and a faster, more capable default search. Good stuff!
And with Node.js 20 past end of life since April, no longer receiving security patches, we're dropping support for it.
The surface you work with is unchanged: schemas, configuration, and content APIs all stay the same. If you use the Studio, but don't maintain one, there's nothing for you to do.
The pre-release is out now via, so you can test the upgrade ahead of time:
We’re publishing v6 peer dependency support for official plugins now, and v6 of the sanity package gets the latest tag on Thursday, June 11:
Read on for full upgrade notes.
In case you missed it (or if you still are on v4); v5 brought 20–30% faster editing (React Compiler), an incoming references inspector (finally!), much better TypeGen, smart typography on by default in the Portable Text Editor, and a stack of editor quality-of-life additions.
We’re shipping v6 with improvements too, and of course, more to come.
Strict mode has always been available via reactStrictMode in sanity.cli, but the default is now true.
reactStrictMode: false in sanity.cli.mode optionPreviously, configuring an array of custom auth providers via auth.providers in sanity.config.ts would append them to the default providers. To replace the built-in providers with your own, you'd set mode: 'replace'.
But the most common reason for adding custom auth is to replace the default providers. So it made sense to change it.
As of v6, auth.providers replaces by default, and mode: 'append' is no longer supported. To keep the previous behavior, use the callback config instead:
Studio v6 upgrades the build to Vite 8, a significant performance win. Across the studios we've measured, build times dropped 2–9×, with a median around 4.8×. Builds that took 10 to 15 seconds on v5 typically land in 1 to 4 seconds on v6. Expansive studios should see comparable gains.
sanity.cli, those overrides aren't shielded from the version bump. Run the pre-release before bumping to catch any breakage.Big kudos to the Vite team for bringing these improvements to the ecosystem!
We changed the default search strategy from groqLegacy to groq2024 (which year is this?) as the default. You get faster search on large datasets, full Portable Text search with deeply nested content coverage, and Google-style queries (wildcards, phrases, negation). This strategy has been production-proven since early 2025.
search.strategy back to groqLegacy in sanity.config.ts:With Node.js 20 at end of life and not receiving security patches anymore, the minimum supported version is now Node.js 22.12, in line with the Sanity CLI.
This only matters for the environments where you run the Studio dev server or build the Studio, so your local machine and your CI or build pipeline. It does not affect a deployed Studio. The Studio builds to static assets (HTML, CSS, JS) that run in the browser, so there is no production server that needs Node or that you need to upgrade.
To resolve, upgrade your local and CI/build environments to Node.js 22.12 or newer, and set engines.node to >=22.12.
Once the Studio is updated, you will get the improvements to search, hopefully fewer bugs, and less confusing custom auth experience. The developers maintaining your studio will handle the update.
After v6 ships on Thursday, June 11, if your studio runs or builds on Node.js 22.12 or newer, runs cleanly under strict mode, and has no custom auth.providers, the upgrade is a version bump:
Otherwise, run sanity dev against the pre-release and work through the changes that apply before bumping.
In either case, if a plugin you depend on hasn't published a v6-compatible peer range yet, npm will fail the install on peer resolution. Run the command below to allow legacy peer dependencies as a stopgap until the plugin(s) catches up:
Test against the pre-release and update your peerDependencies to include v6:
Until you publish that range, studios upgrading to v6 that depend on your plugin will hit an npm peer-dependency error, so publish as soon as you've verified against the pre-release.
You can follow our progress toward v6 being available on latest, including plugin migration and Node 20 support, at Are We V6 Ready.
The pre-release is available under a custom distribution tag on the next branch. The main branch continues to ship v5 through latest, and stable unchanged. To try v6 ahead of promotion to latest:
npm install sanity@next
Promotion to latest happens on Thursday, June 11.
Auto-updates can cross a major when it has no runtime effects (a Node.js version bump, for example), but v6 changes runtime behavior, so it won't roll out automatically. To upgrade, set your sanity dependency to ^6.0.0 and redeploy. Read the docs on understanding the latest version of Sanity to learn more.
Questions? Find us in the Sanity Community Discord or check the changelog when v6 ships.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。