@shipeasy/next
Next.js middleware adapter for Shipeasy. Mints the shared
__se_anon_id bucketing cookie at the edge, before render, so the very first
request already has a stable bucketing unit — SSR and the browser SDK then
evaluate against the identical value at any rollout percentage.
npm install @shipeasy/next
export { middleware, config } from "@shipeasy/next";
Composing with your own middleware:
import { withShipeasy } from "@shipeasy/next";
export const middleware = withShipeasy(async (req) => {
});
next is a peer of this package only — it is not a peer of @shipeasy/sdk,
which declares no peer dependencies at all.
Full docs: https://shipeasy-ai.github.io/sdk-ts/pages/installation.md