To initiate a new Studio without installing the CLI globally:
npx create-sanity@latest
To upgrade an existing Studio (v3):
npm install sanity@latest
The npm create sanity
and sanity init
CLI commands now have two new flags available:
--bare
- skips the installation of a Sanity Studio. Instead, it takes you through the project and dataset creation process and prints the project ID and dataset names to the console.--env [path]
- detects the framework used in the current directory and creates a.env
file with the correct prefix for environment variables. Thepath
is optional; the default value is.env
, but you can change it to anything beginning with.env
, for example,.env.local.example
.
These flags are useful when you want to integrate an application with a new or existing project, when you have some existing Studio code you want to set up, or when you only need the Content Lake capabilities.
Lists of objects and references are now virtualized in the Sanity Studio UI. This should significantly improve performance in documents with large arrays.
Any custom Vite configuration defined in sanity.cli.ts
will now be merged with the default configuration using Vite’s merge logic. This improvement will make it easier customize the Vite configuration without having to deeply understand the defaults. The configuration now also has improved TypeScript types.
- The schema validator now checks for fields that use the
block
type outside of an array, which is not currently supported (thanks @pauloborges!)
- Resolves an error that occurred when attempting to create a document of a certain type with an empty object as the initial value, resulting in a permission error
- Addresses an issue where CSS files were not properly updated with a configured Studio base path
- Fixes a bug that caused the Studio to crash when trying to fetch user data without proper permissions
- Resolves a problem where multiple sorting options could be selected at the same time in a dropdown menu
- Addresses an issue where long filenames/MIME types were not truncated in the file picker list
- Resolves a bug that caused the Portable Text Editor to crash when encountering an invalid value.