import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
  output: 'standalone',
  // 构建时注入时间戳，客户端和 /api/version 均使用此值判断版本是否更新
  env: {
    NEXT_PUBLIC_BUILD_TIME: String(Date.now()),
  },
  reactStrictMode: true,
  images: {
    remotePatterns: [
      {
        protocol: 'https',
        hostname: '**',
      },
    ],
  },
  async redirects() {
    return [
      {
        source: '/',
        destination: '/dashboard',
        permanent: false,
      },
    ];
  },
};

export default nextConfig;
