extract-css-chunks-webpack-plugin icon indicating copy to clipboard operation
extract-css-chunks-webpack-plugin copied to clipboard

Critical css process

Open ghisleouf opened this issue 4 years ago • 2 comments

Hi guys,

I ‘m working on an universal Vue.js project where your great plugin is involved. Currently, on my Webpack production build, CSS is extracted into chunks.

What I would like to perform is injecting into dom (inline I mean) critical CSS which could be determined as non-scoped CSS into the project.

Do you have any insights, advices or even exemples to help me achieve it ?

Thanks a lot for help.

VueSSR is involved in the project, not Nuxt directly.

ghisleouf avatar Aug 08 '20 06:08 ghisleouf

No I do not. Likely you'd need some prerendering stage to determine what's actually used ahead of time

ScriptedAlchemy avatar Aug 09 '20 22:08 ScriptedAlchemy

Hi @ScriptedAlchemy ,

Thanks for your answer. I realize ma question was not very clear.

The thing I have today is, as an example, 3 chunk files(default.css, chunk-b.css, chunk-c.css). I would link to be able to :

  • instead of creating a css for default.css, i would like to inject it inline
  • chunk-b.css and chunk-c.css files stay as they are, into separated css files.

I hope it is clear now :)

Thanks for your help.

ghisleouf avatar Aug 10 '20 07:08 ghisleouf