1

How can I get Next.js to generate pure html as the page is rendered and not all this extra overhead. My index page is just a list of links. I just want index.html. Is that possible?

Output

Edit : How to get around api routes not working with export? I have a json file with list of {url,title} that I want to render in index.html statically

Hassan Voyeau
  • 3,383
  • 4
  • 22
  • 24
  • 1
    I think that what you receive is static generated page (with JS). What you describe is something like a snapshot, when we used it with ReactJS to generate content for hydration. Example: https://github.com/stereobooster/react-snap – Buggies Jun 26 '23 at 20:51
  • I found out I could import the json file directly - https://trinbagotechie.blogspot.com/2023/06/part-2-example-of-using-nextjs-for.html – Hassan Voyeau Jun 27 '23 at 14:35

0 Answers0