I just created a new project and followed this page from NextJS documentation:
And here is the page I get after running 'npm run dev':
You can see that the page has none of the global styles and the body element's styles are also empty.
CodePudding user response:
I tried deleting the .next folder and restarting the server and it finally worked. I think the issue is that creating /pages/_app.js requires you to recreate the whole build and just restarting it without deleting .next entirely isn't enough.
CodePudding user response:
Sometimes browsers do cache style files. You can force browser to download new style file by refreshing page with Ctrl F5.