Skip to main content
A Next.js app built as a static export is a site. Server Components work, because they run during next build. An app that renders on each request, or uses server actions, middleware or route handlers that run on each request, needs a server: make it a Mist app instead. See Site or App?.

Configure the export

next.config.mjs
  • output: "export" writes plain files to out.
  • trailingSlash: true writes each page as about/index.html, which the site serves at /about.
  • images.unoptimized is needed because there is no image server.

Use the SDK

The SDK runs in the browser. Use it in a client component:
app/hello.tsx

Deploy

fluid deploy sees output: "export" in next.config and publishes out. Without it, fluid deploy treats the app as one that needs a server, explains why and publishes nothing. To publish an export by hand, run fluid sites publish --dir out.