40 lines
1.6 KiB
JavaScript
40 lines
1.6 KiB
JavaScript
import { withPayload } from '@payloadcms/next/withPayload'
|
|
import createNextIntlPlugin from 'next-intl/plugin'
|
|
|
|
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts')
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
distDir: process.env.NEXT_DIST_DIR || '.next',
|
|
images: {
|
|
formats: ['image/avif', 'image/webp'],
|
|
remotePatterns: [
|
|
{ protocol: 'https', hostname: 'www.eversolo.com' },
|
|
{ protocol: 'https', hostname: 'eversolo.com' },
|
|
],
|
|
},
|
|
async redirects() {
|
|
// Legacy URL -> new URL map. Edit REDIRECTS.md for the authoritative list.
|
|
return [
|
|
// Locale entry points
|
|
{ source: '/Index/index/l/en-us.html', destination: '/en', permanent: true },
|
|
{ source: '/Index/index/l/zh-cn.html', destination: '/zh', permanent: true },
|
|
|
|
// Header / top nav
|
|
{ source: '/Product/allProduct.html', destination: '/en/products', permanent: true },
|
|
{ source: '/Support/support.html', destination: '/en/support', permanent: true },
|
|
{ source: '/Support/downloads.html', destination: '/en/downloads', permanent: true },
|
|
{ source: '/About/index.html', destination: '/en/about', permanent: true },
|
|
|
|
// Footer / secondary
|
|
{ source: '/Contact/afterservice.html', destination: '/en/support/warranty', permanent: true },
|
|
{ source: '/Contact/distributor.html', destination: '/en/dealers', permanent: true },
|
|
{ source: '/Contact/oem.html', destination: '/en/support/contact', permanent: true },
|
|
|
|
]
|
|
},
|
|
}
|
|
|
|
export default withNextIntl(withPayload(nextConfig))
|