/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'standalone',
  images: {
    formats: ['image/avif', 'image/webp'],
    remotePatterns: [
      {
        protocol: 'https',
        hostname: 'cdn.shopify.com',
        pathname: '/s/files/**'
      }
    ]
  },
  // Ručno implementiramo rewrite-ove za i18n
  async rewrites() {
    return {
      beforeFiles: [
        // Handle /en/* routes
        {
          source: '/en',
          destination: '/'
        },
        {
          source: '/en/:path*',
          destination: '/:path*'
        }
      ]
    };
  }
};

export default nextConfig;