Home

Issue: 3102

How does the nuxtjs website inline CSS on the server side?

[issue link]

Hi,

I’m in the middle of porting my Vue.js app to nuxt.js right now and I’ve ran into a issue. Can you help me out?

When my website is being loaded there is no CSS in document at all, so the server doesn’t generate any CSS. All of the CSS is being generated by the browser which makes the page look weird when the JavaScript is still getting loaded on the client side.

I read about the CSS flash on here but I realised even when I ran the application in production mode using the npm run build command followed by npm run start, it still does the CSS flashing.

I want to know how I can change my Nuxt.js app so that the server inlines the CSS instead of the browser.

I looked at the nuxt.js website and it generates the CSS on the server side rather then client side. Can you please tell me how it does that so I can do that as well?

This question is available on Nuxt.js community (#c2686)