A
A
Alexander2021-06-02 08:52:23
webpack
Alexander, 2021-06-02 08:52:23

How can I move the styles from the file to the style tag of the header?

I enabled extractCss: true in nuxt.config so that all styles are connected via a link and the browser can cache them. But the problem is that when the page is reloaded, bare html is first visible, and after a moment the styles are loaded and the layout becomes correct. I moved the styles that are necessary for correct layout to a separate critical.css file. You need to add the styles from this file inline to the style tag. How can this be implemented?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question