import type { NextConfig } from "next";

const withPWA = require("@ducanh2912/next-pwa").default({
  dest: "public",
  register: true,
  skipWaiting: true,
  disable: process.env.NODE_ENV === "development",
});

const nextConfig: NextConfig = {
  // Enable standalone output for Docker
  output: 'standalone',

  // Optimize for production
  reactStrictMode: true,

  // Image optimization (enabled for better performance)
  images: {
    formats: ['image/avif', 'image/webp'],
  },

  // Hide the "compiling" indicator
  devIndicators: false,

  // Silence warning from Next-PWA custom webpack injections
  turbopack: {},
};

export default withPWA(nextConfig);
