GoogleChromeLabs / critters

🦔 A Webpack plugin to inline your critical CSS and lazy-load the rest.

Home Page:https://npm.im/critters-webpack-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parse include/exclude markers with @preserve or /*! hints

xumepadismal opened this issue · comments

Some bundlers (in my case it's Angular CLI) minifies CSS before running critters. Therefore, any /* critters:exclude */ comments got stripped.

However, it's possible to preserve them using /*! critters:exclude */ or /* critters:exclude @preserve */ hints but in this case these markers are ignored by critters.

Would it be possible to implement a bit smarter parse logic to support these cases?

Thanks