/** * @type {import('next').NextConfig} */ const output = process.env.NODE_ENV === 'production' ? 'export' : 'standalone'; const nextConfig = { trailingSlash: true, distDir: 'build', output, basePath: '', images: { unoptimized: true, remotePatterns: [ { protocol: 'https', hostname: '**', }, ], }, webpackDevMiddleware: (config) => { config.watchOptions = { ...config.watchOptions, poll: 1000, ignored: ['**/node_modules', '**/.git'], }; return config; }, async rewrites() { return [ { source: '/services', destination: '/web_pages/services', }, { source: '/contact', destination: '/web_pages/contact', }, { source: '/home', destination: '/web_pages/home', }, { source: '/about', destination: '/web_pages/about', }, { source: '/faq', destination: '/web_pages/faq', }, { source: '/_next/webpack-hmr', destination: '/_next/webpack-hmr', }, ]; }, }; export default nextConfig;