Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions next.config1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// next.config.ts
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is named 'next.config1.ts' but should be named 'next.config.ts' to be recognized by Next.js. The current working configuration file is 'next.config.ts' in the root directory. This new file will not be used by Next.js unless the existing 'next.config.ts' is removed or renamed.

Copilot uses AI. Check for mistakes.
import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";

// ✅ Initialize i18n plugin
const withNextIntl = createNextIntlPlugin("./src/config/i18n/request.ts");

// ✅ Define remote image sources
const REMOTE_IMAGE_HOSTS = [
"images.unsplash.com",
"cdn.hashnode.com",
"hashnode.imgix.net",
"avatars.githubusercontent.com",
"media.licdn.com",
"media-exp1.licdn.com",
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remote image host 'images.lumacdn.com' is missing from REMOTE_IMAGE_HOSTS. This host is currently configured in the existing next.config.ts file and is actively used in the codebase (see src/base/data/dummy/index.ts line 12). Removing it will cause images from this domain to fail loading.

Suggested change
"media-exp1.licdn.com",
"media-exp1.licdn.com",
"images.lumacdn.com",

Copilot uses AI. Check for mistakes.
];

const nextConfig: NextConfig = {
reactStrictMode: true, // Helps catch bugs early
swcMinify: true, // Faster, more efficient minification
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The swcMinify option is deprecated in Next.js 13+ and enabled by default. This configuration line has no effect and should be removed. SWC minification is automatically used in modern Next.js versions.

Suggested change
swcMinify: true, // Faster, more efficient minification

Copilot uses AI. Check for mistakes.
productionBrowserSourceMaps: false, // Security improvement
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting productionBrowserSourceMaps to false unconditionally removes source maps in production. The existing configuration (next.config.ts line 12) conditionally enables source maps based on NEXT_PUBLIC_NODE_ENV, which is more flexible for debugging production issues. Consider whether completely disabling production source maps aligns with your debugging needs.

Suggested change
productionBrowserSourceMaps: false, // Security improvement
productionBrowserSourceMaps:
process.env.NEXT_PUBLIC_NODE_ENV === "production-debug", // Enable source maps only for explicit debug builds

Copilot uses AI. Check for mistakes.
output: "standalone",

eslint: {
ignoreDuringBuilds: true, // Avoid blocking builds in CI/CD
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling ignoreDuringBuilds will skip ESLint checks during builds. While this may speed up CI/CD, it means linting errors will not block deployments. The existing next.config.ts has this commented out, suggesting a deliberate decision to keep linting enabled during builds. Consider whether bypassing linting checks aligns with your code quality standards.

Suggested change
ignoreDuringBuilds: true, // Avoid blocking builds in CI/CD
ignoreDuringBuilds: false, // Keep linting enabled so build-breaking issues are caught

Copilot uses AI. Check for mistakes.
},

images: {
remotePatterns: REMOTE_IMAGE_HOSTS.map((host) => ({
protocol: "https",
hostname: host,
pathname: "/**",
})),
formats: ["image/avif", "image/webp"], // ✅ Faster image formats
},

experimental: {
scrollRestoration: true, // UX improvement for back/forward navigation
serverActions: true, // Future scalability for server-side logic
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The experimental.serverActions option has been stable since Next.js 14 and is enabled by default. In Next.js 16.1.5 (the version used in this project), this configuration has no effect and should be removed.

Suggested change
serverActions: true, // Future scalability for server-side logic

Copilot uses AI. Check for mistakes.
},
Comment on lines +37 to +40
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The optimizePackageImports experimental feature has been removed. The existing configuration optimizes imports for 'lucide-react' and 'framer-motion', which are both used in this project (see package.json). Removing this optimization may negatively impact bundle size and initial load performance. Consider retaining this configuration alongside the new changes.

Copilot uses AI. Check for mistakes.

Comment on lines +38 to +41
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scrollRestoration experimental option does not exist in Next.js. The framework handles scroll restoration automatically through the built-in router. This configuration will have no effect and should be removed.

Suggested change
scrollRestoration: true, // UX improvement for back/forward navigation
serverActions: true, // Future scalability for server-side logic
},
serverActions: true, // Future scalability for server-side logic
},

Copilot uses AI. Check for mistakes.
compiler: {
removeConsole:
process.env.NODE_ENV === "production" ? { exclude: ["error"] } : false, // ✅ Cleaner production builds
},

headers: async () => [
{
source: "/(.*)",
headers: [
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{ key: "Permissions-Policy", value: "geolocation=()" },
],
},
],
};

export default withNextIntl(nextConfig);
Loading