Dynamic routes with static export
Answered
Florida White posted this in #help-forum
Florida WhiteOP
I'm using Next.js 14 with static export because I don't need SSR, and I require static HTML + JS files for an IIS server. I can't use
getStaticPaths because the paths are not known beforehand. I used the App Directory, but for dynamic routes, I switched to the Pages Directory (just for the dynamics, in order to avoid a full refactor). However, they are not working. When I navigate to a dynamic route, Next.js is looking for 123.txt instead of [id].txt. (The .txt file doesn't exist, so it wouldn't work anyway.) Is there a way to make this work?Answered by Florida White
I solved it by uninstalling Next and switching back to React. 🥲
1 Reply
Florida WhiteOP
I solved it by uninstalling Next and switching back to React. 🥲
Answer