Sanity Library Reference Docs
    Preparing search index...
    • Beta

      Defines a studio.

      Deploying Studios via Blueprints is experimental. This may be subject to breaking changes.

      Parameters

      • config: BlueprintStudioConfig

        The studio configuration

        Configuration for a Studio resource.

        • OptionalautoUpdates?: { enabled?: boolean; version?: string }

          Auto update settings for the studio. Defaults to {enabled: true}.

          • Optionalenabled?: boolean

            Whether auto updates are enabled for the studio. Defaults to true.

          • Optionalversion?: string

            What "version"/"channel" to use for auto updates

        • Optionalicon?: string

          Path to the icon image, relative to root. Uploaded on every deploy; omitting it removes the icon. PNG, JPEG, BMP, GIF, TIFF, SVG, WebP, HEIF or AVIF, up to 5 MB.

        • OptionalmfManifest?: Record<string, unknown>

          Module federation manifest

        • Optionalminify?: boolean

          Whether or not to minify the source code. Defaults to true.

        • name: string

          The name of the resource. Unique within the blueprint. e.g. 'sync-webhook'

        • Optionalproject?: string

          The project ID of the project that contains your Studio.

          The project attribute must be defined if your blueprint is scoped to an organization.

        • OptionalreactCompiler?: boolean

          Whether or not to configure the reactCompiler. Defaults to false.

        • root: string

          The relative location of the studio directory.

        • OptionalschemaInputs?: WorkspaceSchemaInput[]

          Schema inputs extracted from the studio's schema definition.

        • Optionalslug?: string

          The slug to be used in the studio hostname. Must match ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$.

          Defaults to the name of the resource. Set slug explicitly if the resource name is not a valid hostname.

        • OptionalsourceMap?: boolean

          Whether or not to generate source maps. Defaults to false.

        • Optionaltitle?: string

          Title for the studio. Defaults to the name of the resource.

        • Optionalversion?: string

          The local version of sanity at deployment. Populated during deployment.

        • Optionalvisibility?: "default" | "unlisted" | "disabled"

          Dashboard visibility

        • Optionalvite?: UserViteConfig

          Custom Vite configuration for the Studio so it can be changed and extended. Install vite to dev dependencies to get detailed type information.

        • Optionalworkspaces?: StudioWorkspace[]

          Workspaces extracted from the studio's configuration.

      Returns BlueprintStudioResource

      The studio resource

      defineStudio({
      name: 'my-studio',
      project: 'my-project-id',
      root: 'studios/my-studio',
      autoUpdates: {
      enabled: true
      }
      })