pug-plugin
critters
Our great sponsors
pug-plugin | critters | |
---|---|---|
4 | 7 | |
65 | 3,349 | |
- | 0.5% | |
6.7 | 6.6 | |
7 days ago | 21 days ago | |
JavaScript | JavaScript | |
ISC License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pug-plugin
-
What is the best way of compiling/bundling pug.js for a static site these days?
Try to use the pug-plugin for Webpack.
critters
-
Show HN: Jampack – Optimizes static websites as a post-processing step
I'm interested in the notion of identifying "critical" CSS that should be inlined rather than live in its own stylesheet.
I was hoping there was some principled way of identifying critical and non-critical CSS (e.g. user interaction effects like :hover would always be considered non-critical), but it looks like the library it's using just tries to render your page and do a best-effort detection on which rules are considered critical, which is a little unsatisfying: https://github.com/GoogleChromeLabs/critters
-
Optimize CSS with SAT Solving
https://github.com/GoogleChromeLabs/critters Might be a good starting point. It’s designed to inline the css afterward so it’s more focused on extracting used css than removing unused.
-
Optimizing CSS Performance in Nuxt with Critters
// nuxt.config.js import { defineNuxtConfig } from 'nuxt' export default defineNuxtConfig({ modules: ['@nuxtjs/critters'], critters: { // Options passed directly to critters: https://github.com/GoogleChromeLabs/critters#critters-2 config: { // Default: 'media' preload: 'swap', }, }, })
-
Critical CSS? Not So Fast
I find critters[0] quite easy to work with and well worth implementing on my nextjs or Astro projects.
I build a lot of landing pages so there are very few multi page visits.
What are some alternatives?
pug-loader - Pug loader for Webpack renders pug to HTML or template function
compression-webpack-plugin - Prepare compressed versions of assets to serve them with Content-Encoding
critters - CSS optimization using critters for Nuxt
gulp-pug-starter - Frontend development with pleasure. Pug + SCSS version
offline-plugin - Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)
eink-css-ui-framework - ePaperCSS: The ePaper CSS UI framework for e-ink and ePaper displays. Optimized for grayscale & accessibility
html-bundler-webpack-plugin - This plugin allows to use an HTML template as a starting point for all dependencies used in your web application. All source styles, scripts specified in HTML are processed, and the extracted JS, CSS are saved to the output directory. The plugin automatically substitutes output filenames into the generated HTML file.
webpack-assets-manifest - This webpack plugin will generate a JSON file that matches the original filename with the hashed version.
mangle-css-class-webpack-plugin - Minifies and obfuscates the class names in your existing JavaScript, CSS, and HTML without any modern css modules.
parallax-3d-lens-effect - 3D parallax effect by mouse moving using CSS transform
penthouse - Generate critical css for your web pages
webpack-fix-style-only-entries - Webpack plugin to solve the problem of having a style only entry (css/sass/less) generating an extra js file.