@sanity/client
compatibility with JS runtimesYou should be able to use @sanity/client
from any runtime, including Cloudflare Workers, Deno, Bun, and more.
Status | Name | Runtime | Entry | Conditions |
---|---|---|---|---|
Bun v0.1 | bun | exports.worker | browser, bun, import, module, worker, worker.browser | |
Cloudflare Worker | cloudflare-worker | exports.worker | browser, import, worker, worker.browser | |
Cloudflare Worker Node compatibility mode | cloudflare-worker | exports.worker | browser, import, worker, worker.browser | |
Deno v1 Node compatibility mode | deno | exports.node.deno | deno, import, node, node.deno, node.import | |
Deno v1 Packages from CDN | deno | exports.worker | browser, deno, import, module, worker, worker.browser, worker.node | |
Next.js Edge Function | vercel-edge | exports.browser | browser, import, module, webpack | |
Next.js Serverless Function | node | exports.node.import+exports.node.require | import, node, node.deno, node.import | |
Node.js CJS v10 | node | main | ||
Node.js CJS v12 | node | exports.node.require | node, node.require, require | |
Node.js CJS v14 | node | exports.node.require | node, node.require, require | |
Node.js CJS v16 | node | exports.node.require | node, node.require, require | |
Node.js CJS v18 | node | exports.node.require | node, node.require, require | |
Node.js ESM v14 | node | exports.node.import+exports.node.require | import, node, node.deno, node.import | |
Node.js ESM v16 | node | exports.node.import+exports.node.require | import, node, node.deno, node.import | |
Node.js ESM v18 | node | exports.node.import+exports.node.require | import, node, node.deno, node.import | |
Vercel Edge Function | vercel-edge | module | ||
Vercel Serverless Function | node | exports.node.require | node, node.require, require |