Back to templates
Next.js Static
A Next.js Static static site hosted on Wasmer Edge

Next.js Static Export + Wasmer
This example shows how to export a Next.js app as static HTML and host it on Wasmer Edge.
Demo
https://wasmer-edge-next-ssg-sample.wasmer.app/
How it Works
next.config.jssetsoutput: "export", sonext build && next exportemit static files into theout/directory.src/app/page.tsxcontains the landing page (App Router), but any other static routes you add will be exported too.- No serverless runtime is required—Wasmer simply serves the generated HTML/CSS/JS.
Running Locally
npm install
npm run dev
Open http://127.0.0.1:3000/ to develop with hot reload. To preview the static export:
npm run build
npm run export
npm run serve # serves the ./out folder
Deploying to Wasmer (Overview)
- Build the site:
npm run build && npm run export(creates theout/folder). - Configure Wasmer Edge to publish the
out/directory. - Deploy and access
https://<your-subdomain>.wasmer.app/.