critters

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

APACHE-2.0 License

Downloads
11.2M
Stars
3.4K
Committers
19

Bot releases are hidden (Show)

critters - critters-webpack-plugin-3.0.2 Latest Release

Published by developit almost 3 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/GoogleChromeLabs/critters/compare/critters-webpack-plugin-3.0.1...critters-webpack-plugin-3.0.2

critters - critters-0.0.16

Published by developit almost 3 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/GoogleChromeLabs/critters/compare/critters-0.0.15...critters-0.0.16

critters -

Published by developit almost 3 years ago

  • Updates internal critters dependency to 0.0.15 (#89, thanks @rschristian)
critters - critters 0.0.15

Published by developit almost 3 years ago

  • Bugfix: add missing getter for document.head (#87, thanks @rschristian!)
critters - critters-webpack-plugin 3.0.0

Published by developit almost 3 years ago

What's Changed

  • critters-webpack-plugin is now powered by a refactored standalone critters module. Processing now uses JSDOM and css-select (huge thanks thanks @janicklas-ralph and @alan-agius4 - #61, #80, #82)
  • Added support for html-webpack-plugin V4 (thank you @alexjie! #62, #84)
  • Add swap-high preload mode by @developit in #56

Bug Fixes

  • skip processing of remote stylesheets by @alan-agius4 in #75, #83
  • Improve TypeScript typings by @developit in #76
  • Use a real value for swap media by @developit in #39

Full Changelog: https://github.com/GoogleChromeLabs/critters/compare/2.5.0...critters-webpack-plugin-3.0.0

critters - critters-0.0.13

Published by developit almost 3 years ago

This fixes a bug in [email protected] where HTTP (as opposed to HTTPS) remote stylesheets were not skipped (thanks @alan-agius4 - #83)

Full Changelog: https://github.com/GoogleChromeLabs/critters/compare/critters-0.0.12...critters-0.0.13

critters - Critters 0.0.12

Published by developit almost 3 years ago

What's Changed

Full Changelog: https://github.com/GoogleChromeLabs/critters/compare/57c4b40fb96d74e8c5ac5b00cbcd84a3c491db77...critters-0.0.12

critters -

Published by developit almost 5 years ago

  • Adds a new additionalStylesheets option, which allows inlining the critical styles from any emitted Webpack CSS asset matching the given pattern(s). Thanks @prateekbh for implementing this in #45!
plugins: [
  new CrittersPlugin({
    // inline styles from all CSS files, even if not referenced from our HTML:
    includeMatchingStylesheets: ['*.css']
  })
]
critters - 1.3.5 (patch release for legacy 1.x versions)

Published by developit almost 5 years ago

This is a patch release for Critters 1.x, which includes a backported fix for a bug where Keyframe rules would be erroneously treated as non-critical CSS. Special thanks to @filoozom and @pathacks for pointing out this should be backported and doing the work.

Please note this fix has already been shipped in Critters 2.x.

For those looking to install 1.x directly: npm i critters-webpack-plugin@legacy

critters -

Published by developit about 5 years ago

  • Preserve :root{} rulesets (#37, thanks @ashsearle!)
critters -

Published by developit over 5 years ago

  • Fixes incorrect file locations when using a custom output.publicPath (#31)
  • Fixes a crash when there are no stylesheets to merge and mergeStylesheets is enabled (#30, thanks @ezekielchentnik!)
critters -

Published by developit almost 6 years ago

  • New logLevel option! "silent" disables size & selector errors. Other values described here. (#25, thanks @gribnoysup!)
  • Fix an exception when running under Webpack 3 and prior.
critters -

Published by developit almost 6 years ago

  • Fix exception thrown when no <style> tags are present
  • Fix bug that caused non-matched selectors for critical rules to be inlined
critters -

Published by developit almost 6 years ago

  • Fixes a bug in 2.1.1 where reduced external stylesheets could be missing selectors.
critters -

Published by developit almost 6 years ago

  • Critical styles are now injected prior to <link rel="stylesheet"> to ensure correct style rule ordering (#17)
critters -

Published by developit almost 6 years ago

Updates

  • Always preload fonts using crossorigin="anonymous" (#18, thanks @Ansimorph!)

Bug Fixes

  • Fix bug when pseudo classes follow a child combinator (> :after) (#20, thanks @yun77op!)
  • Fix some critical keyframes being marked as non-critical
critters -

Published by developit almost 6 years ago

🦄 Moar performance features! (and a bugfix)

  • Inlined styles are now merged into a single <style> and minified together for better compression (pass mergeStylesheets:false to disable)
  • New minimumExternalSize option avoids lazy-loading tiny non-critical stylesheets, simply inlining them if they're smaller than a given number of bytes.
  • Fix empty keyframe and media rules being incorrectly inlined in 2.0.0
critters -

Published by developit almost 6 years ago

🦄 Snazzy new performance features!

Critters now updates external stylesheets to remove any rules & selectors it inlined! No more duplicate CSS. You can turn this off and get the 1.x behavior using the pruneSource: false option.

A new inlineThreshold option tells Critters to completely inline stylesheets below a certain size without reducing them to "critical" rules. If you're building an application with a really small amount of CSS required for the first view and it's already in a dedicated file/asset, this option is for you!

critters -

Published by developit almost 6 years ago

  • Skip empty selectors rather than showing a warning
  • Address a stylesheet lookup failure case, and show a friendly message when styles can't be found (#7)
critters -

Published by developit almost 6 years ago

  • Fix one last straggler case for pseudo elements.