GoogleChromeLabs / critters

🦔 A Webpack plugin to inline your critical CSS and lazy-load the rest.
https://npm.im/critters-webpack-plugin
Apache License 2.0
3.42k stars 108 forks source link

Disable font-face exclusion #136

Open ThornWalli opened 1 year ago

ThornWalli commented 1 year ago

Hello,

is there any way I can stop font faces from being extracted?

Already did it with

/* critters:include start */ or /* critters:include */. I'm afraid that font-faces are basically touched, but unfortunately it makes problems for us.

Because in the code the include doesn`t seem to affect the font-faces.

https://github.com/GoogleChromeLabs/critters/blob/19476119082f12f120077137ab67a7c863944212/packages/critters/src/index.js#L506-L594

Would like to disable everything that has to do with fonts.

Example: We have x font faces in our HTML. These are then loaded in the client via document.fonts. But because Critter takes them out they are missing.