Guides

Framework adapters

Glacier's core is framework-agnostic. Adapters handle the wiring — request context, edge runtime, and lifecycle — so you don't have to.


Next.js

npm i @glacier/next
// next.config.js
const { withGlacier } = require('@glacier/next')

module.exports = withGlacier({
  glacier: { edge: true },
})

The Next adapter hooks into both the App Router and route handlers, and runs warming in the edge runtime automatically when edge is on.

Remix

npm i @glacier/remix
import { glacierLoader } from '@glacier/remix'

export const loader = glacierLoader(async ({ params }) => {
  return getProject(params.id)
})

Other frameworks

FrameworkPackageNotes
SvelteKit@glacier/sveltekitHooks into handle and load
Astro@glacier/astroMiddleware integration
Express@glacier/expressPlain middleware for Node servers

No adapter for your stack?

The core SDK works anywhere JavaScript runs. An adapter only saves boilerplate — you can always call glacier.prefetch() and glacier.invalidate() directly from any handler. See the Architecture guide for the integration surface.

Previous
React hooks