Next.js enables starting as a static site or Single-Page Application (SPA), then later optionally upgrading to use features that require a server.
/** @type {import('next').NextConfig} */
const nextConfig = {
// output: "export", // UNCOMMENT TO ENABLE STATIC EXPORT.
// images: { unoptimized: true }, // UNCOMMENT TO ENABLE STATIC EXPORT.
};
export default nextConfig;
After running next build, Next.js will produce an out folder which contains the HTML/CSS/JS assets for your application. It can be deployed and hosted on any web server that can serve HTML/CSS/JS static assets.
It will be served on your local web server. You can now view your application in your browser.
Everything you need to create your next unique and professional website, including impressive and ready-made blocks and pages.
Buy Sandbox