From e5ecb765193d75328ffcbececd62f27b1113e34e Mon Sep 17 00:00:00 2001 From: PK Date: Mon, 3 Feb 2025 17:21:49 +0700 Subject: [PATCH] Update Next.js configuration to set output mode and adjust image handling for GitHub Pages compatibility --- next.config.mjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index c989be1..efd2ea1 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -2,15 +2,19 @@ import createNextIntlPlugin from 'next-intl/plugin'; const withNextIntl = createNextIntlPlugin(); /** @type {import('next').NextConfig} */ const nextConfig = { + output: "export", images: { domains: ['cosi.bu.ac.th', 'github.com', 'www.countryflags.com'], }, eslint: { ignoreDuringBuilds: true, // Allows build to complete even if ESLint errors exist }, - experimental: { - outputStandalone: true, // Ensures correct output for static exports + images: { + unoptimized: true, // Required since GitHub Pages doesn't support Next.js image optimization }, + // experimental: { + // outputStandalone: true, // Ensures correct output for static exports + // }, }; export default withNextIntl(nextConfig);