Is there a way to implement a loader page during transitions within the same web application using Next JS?
During development, the pages transition smoothly with the CSS applied correctly. However, when moving the application to production environment, there is a brief moment where the transition appears like this for 1 or 2 seconds: https://i.sstatic.net/bgVSD.png
After this short delay, the page renders as expected: https://i.sstatic.net/rBypo.png
I am unsure of how to address this issue and believe it could potentially be resolved through one of two solutions:
- Implementing a loader page between page transitions.
- Making adjustments to _app.js or _document.js, although I am not sure where to begin with this approach.