diff --git a/next.config.js b/next.config.js index ae0dbb3..bc9b137 100644 --- a/next.config.js +++ b/next.config.js @@ -1,3 +1,13 @@ +const isProd = process.env.NODE_ENV === "production"; + +let redirects = []; +if (isProd) { + redirects = [ + { source: "/", destination: "/cars", permanent: false }, + { source: "/coe", destination: "/coe/prices", permanent: false }, + ]; +} + /** @type {import('next').NextConfig} */ const nextConfig = { logging: { @@ -5,6 +15,9 @@ const nextConfig = { fullUrl: true, }, }, + async redirects() { + return redirects; + }, }; module.exports = nextConfig;