Framework Guides
Next.js
Deploy a statically exported Next.js project to Sample.app.
Sample.app serves static files only. To deploy a Next.js project, you need to enable static export.
Static export doesn't support server-side rendering, API routes, middleware, or image optimization. See the Next.js static export docs for full details.
Deploy
Configure static export
Add output: 'export' to your Next.js config:
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
};
module.exports = nextConfig;Deploy to Sample.app
samplex deploy ./outImage optimization
Next.js image optimization requires a server, which isn't available with static export. Add this to your config:
const nextConfig = {
output: "export",
images: {
unoptimized: true,
},
};Consider using a third-party image CDN or pre-optimizing images at build time as an alternative.

