Exporting the App to a Static Site in Next.js

PHOTO EMBED

Sat Dec 09 2023 18:41:06 GMT+0000 (Coordinated Universal Time)

Saved by @devbymohsin

/** @type {import('next').NextConfig} */

const isProd = process.env.NODE_ENV === 'production';
const nextConfig = {
  basePath: isProd ? '/Deploy-a-Next.js-App-to-GitHub-Pages': '',
  output: 'export',
  distDir: 'dist',
  images: {
    unoptimized: true,
  },
}
module.exports = nextConfig
content_copyCOPY

https://www.youtube.com/watch?v=mJuz45RXeXY