{"id":13506640,"url":"https://github.com/Developmint/nuxt-purgecss","last_synced_at":"2025-03-30T05:31:14.611Z","repository":{"id":33174303,"uuid":"153999249","full_name":"Developmint/nuxt-purgecss","owner":"Developmint","description":"Drop superfluous CSS! A neat PurgeCSS wrapper for Nuxt.js","archived":false,"fork":false,"pushed_at":"2025-03-19T19:59:51.000Z","size":914,"stargazers_count":484,"open_issues_count":27,"forks_count":19,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-21T12:03:44.111Z","etag":null,"topics":["hacktoberfest","nuxt","nuxt-module","nuxt-purgecss","nuxtjs","postcss","purgecss","vue","webpack"],"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/Developmint.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["manniL"],"custom":["https://www.lichter.io/support-me/"]}},"created_at":"2018-10-21T11:07:01.000Z","updated_at":"2025-03-18T13:08:44.000Z","dependencies_parsed_at":"2023-12-14T18:48:15.832Z","dependency_job_id":"d7ec1d75-cd6b-472d-9a23-82b1d624af32","html_url":"https://github.com/Developmint/nuxt-purgecss","commit_stats":{"total_commits":91,"total_committers":14,"mean_commits":6.5,"dds":0.4285714285714286,"last_synced_commit":"249ffe7267dcea9ee64de1e0494f8e1413950b35"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developmint%2Fnuxt-purgecss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developmint%2Fnuxt-purgecss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developmint%2Fnuxt-purgecss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developmint%2Fnuxt-purgecss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Developmint","download_url":"https://codeload.github.com/Developmint/nuxt-purgecss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246034282,"owners_count":20712854,"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","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":["hacktoberfest","nuxt","nuxt-module","nuxt-purgecss","nuxtjs","postcss","purgecss","vue","webpack"],"created_at":"2024-08-01T01:00:54.927Z","updated_at":"2025-03-30T05:31:14.592Z","avatar_url":"https://github.com/Developmint.png","language":"TypeScript","readme":"# Nuxt PurgeCSS - Drop superfluous CSS!\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[![thanks](https://img.shields.io/badge/thanks-%E2%99%A5-ff69b4.svg)](https://thanks.lichter.io/)\n\n[📖 **Release Notes**](./CHANGELOG.md)\n\n## Features\n\n* Remove unneeded CSS with ease\n* Sane default settings\n* Built on top of [purgecss](https://github.com/FullHuman/purgecss)\n* Nuxt 2 and Nuxt 3 support (Use v1.0.0 for Nuxt2 support for now)\n* Fully tested!\n\n## Setup\n\n1. Add `nuxt-purgecss` dependency to your project\n\n```bash\nyarn add --dev nuxt-purgecss # or npm install --save-dev nuxt-purgecss\n```\n\n2. Add `nuxt-purgecss` to the `modules` section of `nuxt.config.{js,ts}`\n\n```js\nexport default {\n  modules: [\n    // Simple usage\n    'nuxt-purgecss',\n\n    // With options\n    ['nuxt-purgecss', { /* module options */ }],\n  ]\n}\n```\n\n:warning: If you are using Nuxt **2**, please use version 1 of the module.\n\n## Options\n\n### Defaults\n\nBefore diving into the individual attributes, please have a look [at the default settings](https://github.com/Developmint/nuxt-purgecss/blob/main/src/config.ts) of the module.\n\nThe defaults will scan all your `.vue`, `.js` and `.ts` files in the common Nuxt folders, as well as checking your `nuxt.config.js` (or `.ts`) for used classes.\nFurthermore, typical classes (like these needed for transitions, the nuxt link ones or those set when using scoped styles) are whitelisted already.\n\nThese settings should be a good foundation for a variety of projects.\n\n### Properties in-depth\n\n#### enabled\n\n* Type: `Boolean`\n* Default: `!nuxt.options.dev` (Disabled during `nuxt dev`, enabled otherwise)\n\nEnables the module when set to `true`.\n\n#### PurgeCSS options\n\nPlease read [the PurgeCSS docs](https://www.purgecss.com/configuration) for information about\nPurgeCSS-related information.\n\n## Examples\n\n### Default setup\n\n```js\n// nuxt.config.js\nexport default {\n  modules: [\n    'nuxt-purgecss',\n  ]\n}\n```\n\n### Customize options\n\n```js\n//nuxt.config.js\nexport default {\n  modules: [\n    'nuxt-purgecss',\n  ],\n\n  purgecss: {\n    enabled: true, // Always enable purgecss\n    safelist: ['my-class'], // Add my-class token to the safelist (e.g. .my-class)\n  }\n}\n```\n\n## Caveats\n\n* Don't forget to add paths to pages and components that are not part the common folders (e.g. third party packages)\n* The default generated 500 and 404 pages will be purged by default. Please ensure you have an appropriate error layout\n* Do not use the old `\u003e\u003e\u003e` or `::v-deep` syntax. Instead, go for `:deep`\n\n## Migrating from v1.x\n\n:warning: If you use Nuxt 2, you can't update to v2.x (yet?)\n\n1. The webpack mode has been removed, as Nuxt 3 supports Vite and webpack. This way, the logic is unified to use the PostCSS plugin of PurgeCSS. There is no `mode` anymore\n2. The config merging logic of v1 has been removed in favor of using [`defu`](https://github.com/unjs/defu). Instead of using functions, write your values as usual and they will be merged.\n3. PurgeCSS has been bumped from v2.x to v5.x - Please check the current [config options](https://purgecss.com/configuration.html#options)\n4. Change the module key has been changed to just `purgecss`.\n5. In addition to `enabled`, all purgecss configurations can be written directly into the `purgecss` object.\n6. Eventually, check out the playground of the module and the [current defaults]([at the default settings](https://github.com/Developmint/nuxt-purgecss/blob/main/src/config.ts))!\n\n\n## License\n\n[MIT License](./LICENSE)\n\nCopyright (c) Alexander Lichter\n\n\u003c!-- Badges --\u003e\n[npm-version-src]: https://img.shields.io/npm/v/nuxt-purgecss/latest.svg\n[npm-version-href]: https://npmjs.com/package/nuxt-purgecss\n\n[npm-downloads-src]: https://img.shields.io/npm/dt/nuxt-purgecss.svg\n[npm-downloads-href]: https://npmjs.com/package/nuxt-purgecss\n\n[github-actions-ci-src]: https://github.com/Developmint/nuxt-purgecss/workflows/ci/badge.svg\n[github-actions-ci-href]: https://github.com/Developmint/nuxt-purgecss/actions?query=workflow%3Aci\n\n[codecov-src]: https://img.shields.io/codecov/c/github/Developmint/nuxt-purgecss.svg\n[codecov-href]: https://codecov.io/gh/Developmint/nuxt-purgecss\n\n[license-src]: https://img.shields.io/npm/l/nuxt-purgecss.svg\n[license-href]: https://npmjs.com/package/nuxt-purgecss\n","funding_links":["https://github.com/sponsors/manniL","https://www.lichter.io/support-me/"],"categories":["Uncategorized","TypeScript"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevelopmint%2Fnuxt-purgecss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDevelopmint%2Fnuxt-purgecss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevelopmint%2Fnuxt-purgecss/lists"}