Welcome to Qi-U Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
38 views
in Technique[技术] by (71.8m points)

javascript - NextJS only renders homepage post build

I am making a website on [email protected], In pre-build scenario everything works fine but after running next build and export only homepage is working. I am using serve to run static files locally. When I am trying to enter /pages in address bar only homepage is loading.

My Folder structure before build is:

  1. Root folder
  • pages/ - index.js, sports.js, about.js
  • styles/ - App.css, Apps.scss, globals.css
  • public/ - Some Images
  • package.json
  • src/ - JS components
  • package-lock.json

My Folder structure after build is:

  1. Root Folder
  • _next/
  • 404.html
  • index.html
  • sports.html
  • about.html
  • Images/

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Qi-U Community for programmer and developer-Open, Learning and Share
...