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

      Defines a background web worker an application runs.

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

      Parameters

      • config: BlueprintWebWorkerConfig

        The web worker configuration

        Configuration for a web worker.

        • name: string

          Unique within the application. Must match ^[a-zA-Z0-9_-]+$.

        • src: string

          The location of the view source code, relative to the application root.

        • title: string

          Human-readable title for the view.

      Returns BlueprintWebWorker

      The web worker declaration

      defineWebWorker({
      name: 'background-refresh',
      title: 'Background Worker',
      src: './src/workers/background-refresh.ts',
      })