Next.js 14 support for AEM
I have been exploring the template on https://github.com/adobe/aem-headless-app-templates for Next.js integration with AEM. This only seems to work with Next.JS 12 and not the latest Next.js. AEM remotepagenext resource type seems to hit two endpoints in Next.js. One to get the next data props and the other to get the asset manifiest.
Next JS 14 doesnt seem to have the next data dom element especially if you use the new app router. Also the asset manifest generated by WebpackAssetsManifest plugin does not output any meaningful entrypoint files like main.js
What is the recommended way to integrate with AEM? Next.js 12 is no longer receiving official security updates and that is a big no to downgrade.