I’m new in Nextjs. I created redirect paths with ajax in next.config.mjs.
But when I changes redirect paths I should rebuild my project once again.
I want redirect new paths without build.
`async redirects() {
let data = await getRedirectsFromApi();
if (data.length > 0) {
} else {
data = [
{
source: "/en/product/:id/:slug",
destination: "/product/:id/:slug",
permanent: true
},
];
}
// console.log(data)
return data;
},`