{"id":22489540,"url":"https://github.com/nuxt-modules/critters","last_synced_at":"2025-08-18T12:39:08.978Z","repository":{"id":40270150,"uuid":"379308767","full_name":"nuxt-modules/critters","owner":"nuxt-modules","description":"CSS optimization using critters for Nuxt","archived":false,"fork":false,"pushed_at":"2025-08-17T10:45:36.000Z","size":3881,"stargazers_count":174,"open_issues_count":10,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-17T12:26:16.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuxt-modules.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["danielroe"]}},"created_at":"2021-06-22T15:01:03.000Z","updated_at":"2025-08-11T16:12:23.000Z","dependencies_parsed_at":"2023-12-18T02:25:25.642Z","dependency_job_id":"0b9cc381-8d41-494d-ab30-381516b73864","html_url":"https://github.com/nuxt-modules/critters","commit_stats":{"total_commits":227,"total_committers":4,"mean_commits":56.75,"dds":"0.14977973568281944","last_synced_commit":"7c48294a82ae1c9d8a0826b3f929094244027fd4"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/nuxt-modules/critters","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-modules%2Fcritters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-modules%2Fcritters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-modules%2Fcritters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-modules%2Fcritters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuxt-modules","download_url":"https://codeload.github.com/nuxt-modules/critters/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-modules%2Fcritters/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270995905,"owners_count":24681930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T17:20:04.078Z","updated_at":"2025-08-18T12:39:08.951Z","avatar_url":"https://github.com/nuxt-modules.png","language":"TypeScript","funding_links":["https://github.com/sponsors/danielroe"],"categories":["TypeScript"],"sub_categories":[],"readme":"# @nuxtjs/critters\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]\n[![Codecov][codecov-src]][codecov-href]\n[![License][license-src]][license-href]\n\n\u003e CSS optimization using [beasties](https://github.com/danielroe/beasties) (formerly [critters](https://github.com/GoogleChromeLabs/critters)) for [Nuxt](https://nuxtjs.org)\n\n## Features\n\n- Zero-configuration required\n- Enables CSS Extraction\n- Critical CSS automatically injected to page\n- Works with Nitro prerendering\n\n## Quick setup\n\n1. Add `@nuxtjs/critters` dependency to your project\n\n```bash\nyarn add @nuxtjs/critters # or npm install @nuxtjs/critters\n```\n\n2. Add `@nuxtjs/critters` to the `modules` section of `nuxt.config.js`\n\n```js\n{\n  modules: [\n    '@nuxtjs/critters',\n  ],\n}\n```\n\n## How it works\n\nNuxt has a number of ways to optimize your CSS in production:\n\n1. ✅ Nuxt uses [`cssnano`](https://cssnano.github.io/cssnano/) in the build step to minify CSS rules\n2. 📦 You can enable [`purgecss`](https://github.com/Developmint/nuxt-purgecss) to remove unused CSS rules from your bundle.\n3. ✅ with `@nuxtjs/critters` you can now extract CSS files and load them separately, just inlining the CSS necessary to render the page.\n\n## Options\n\nYou can override the `@nuxtjs/critters` defaults like this:\n\n```js\n// nuxt.config.js\nimport { defineNuxtConfig } from 'nuxt'\nexport default defineNuxtConfig({\n  modules: ['@nuxtjs/critters'],\n  critters: {\n    // Options passed directly to beasties: https://github.com/danielroe/beasties#beasties-\n    config: {\n      // Default: 'media'\n      preload: 'swap',\n    },\n  },\n})\n```\n\n## Development\n\n1. Clone this repository\n1. Enable corepack with `corepack enable`\n1. Install dependencies using `pnpm install`\n1. Start development server using `pnpm dev`\n\n## License\n\n[MIT License](./LICENSE)\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/@nuxtjs/critters/latest.svg\n[npm-version-href]: https://npmjs.com/package/@nuxtjs/critters\n[npm-downloads-src]: https://img.shields.io/npm/dm/@nuxtjs/critters.svg\n[npm-downloads-href]: https://npm.chart.dev/@nuxtjs/critters\n[github-actions-ci-src]: https://github.com/nuxt-modules/critters/workflows/ci/badge.svg\n[github-actions-ci-href]: https://github.com/nuxt-modules/critters/actions?query=workflow%3Aci\n[codecov-src]: https://img.shields.io/codecov/c/github/nuxt-modules/critters.svg\n[codecov-href]: https://codecov.io/gh/nuxt-modules/critters\n[license-src]: https://img.shields.io/npm/l/@nuxtjs/critters.svg\n[license-href]: https://npmjs.com/package/@nuxtjs/critters\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt-modules%2Fcritters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuxt-modules%2Fcritters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt-modules%2Fcritters/lists"}