I duplicated the official Next.js example using Ant Design at this link: https://github.com/vercel/next.js/tree/canary/examples/with-ant-design
After cloning, I proceeded with npm install to install all dependencies. Then, I ran npm run dev to check if everything was working fine. Subsequently, I used npm run build to build the Next.js app and executed npm run start to run the built app on localhost.
The issue arose when I went to the network tab, selected the localhost page, and previewed it from the preview tab. The Ant Design styles were not being applied properly with server-side rendering, resulting in no visible styles at all initially. It took about half a second for the Ant Design CSS to finally apply, which is not the desired outcome.
Is there a way to properly implement Ant Design with Next.js server-side rendering?