Next.js as an SPA integrated with a different backend?

Viewed 35

I have to redo the frontend of an existing app (with phoenix, not that it should matter) and I was wondering if it was possible to use Next.js for it.

I would like to be able to build only assets (JS, CSS, Images, etc. No HTML though) with Next.js with some sort of manifest that would be read by my backend, backend that would render html with the main script from the manifest. It's far from optimal or SEO friendly but the goal would be to be able to separate the nextjs app from the backend later on.

I couldn't find anything in nextjs' docs to do so but here's an example of what I'm looking for with vite

0 Answers
Related