I have a NextJS app on Firebase working basically the way I want up to a point.
I can access it using a URL like: https://myownthing.web.app
Here is what I want to do next, to create a new route that I will access with: https://myownthing.web.app/Special
The app file system is now structured like this:
-> myownthing
-> next.config.js
-> firebase.json
-> .....
-> app
-> page.tsx
-> layout.tsx
-> .....
-> Special
-> page.tsx
I have already managed to do part of the work. I added a directory called Special under app and a page.tsx inside it, as can be seen in the file system above.
And after running the command:
% npm run dev
I can locally access both routes (as expected):
http://localhost:3000
http://localhost:3000/Special
Next to set things the way I wish on the server side I run in the terminal:
% npm run build
and:
% firebase deploy --only hosting
At this point, I can access (as expected): https://myownthing.web.app
But when trying: https://myownthing.web.app/Special
I get:
404 | This page could not be found.
What am I doing wrong or forgetting ?
Some relevant hints would be welcome.