When serving static content generated from Ionic build we need a web server to read the route and serve the correct files.
What you need to do: Generate a new boiler plate from Ionic CLI with React.
Then build the project to generate a build folder.
Use the content from the build folder as the website to be served.
Generate a new NestJs using their CLI.
Use NestJs to serve the content of the build folder from Ionic.
The test I will be conducting is to run the nestjs project and hit the endpoint to see the web content.
If I navigate and refresh the page the content shouldn't be broken.