{"id":15016535,"url":"https://github.com/5t3ph/eleventy-plugin-sass-lightningcss","last_synced_at":"2025-04-12T09:30:54.939Z","repository":{"id":65714150,"uuid":"596340292","full_name":"5t3ph/eleventy-plugin-sass-lightningcss","owner":"5t3ph","description":"Compile Sass in Eleventy (11ty) and process it with LightningCSS to minify, prefix, and add future CSS support.","archived":false,"fork":false,"pushed_at":"2024-04-07T17:58:06.000Z","size":156,"stargazers_count":32,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T05:08:11.627Z","etag":null,"topics":["11ty","11ty-plugin","eleventy-plugin","lightningcss","sass"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@11tyrocks/eleventy-plugin-sass-lightningcss","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/5t3ph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-02-02T00:55:26.000Z","updated_at":"2024-04-10T21:01:33.000Z","dependencies_parsed_at":"2024-01-17T02:38:14.547Z","dependency_job_id":"e8d0bb76-2c23-42ee-96ce-16508e6329ef","html_url":"https://github.com/5t3ph/eleventy-plugin-sass-lightningcss","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"7288c15ed1ef40ffc5d71b35fba3523eef59c68b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"5t3ph/eleventy-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5t3ph%2Feleventy-plugin-sass-lightningcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5t3ph%2Feleventy-plugin-sass-lightningcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5t3ph%2Feleventy-plugin-sass-lightningcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5t3ph%2Feleventy-plugin-sass-lightningcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5t3ph","download_url":"https://codeload.github.com/5t3ph/eleventy-plugin-sass-lightningcss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248545990,"owners_count":21122243,"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":["11ty","11ty-plugin","eleventy-plugin","lightningcss","sass"],"created_at":"2024-09-24T19:49:02.730Z","updated_at":"2025-04-12T09:30:54.710Z","avatar_url":"https://github.com/5t3ph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eleventy Plugin: Sass and LightningCSS\n\n\u003e Compile Sass in Eleventy (11ty) and process it with LightningCSS to minify, prefix, and add future CSS support.\n\nAlso respects either your package.json `browserslist` or a `.browserslistrc`, otherwise the default targets are `\u003e 0.2% and not dead`.\n\nReview [LightningCSS docs](https://lightningcss.dev/transpilation.html) to learn more about what future CSS features are supported via syntax lowering, including color functions, media query ranges, logical properties, and more.\n\n\u003e **Note**\n\u003e Requires Eleventy v2 - review [upgrade considerations](https://11ty.rocks/posts/new-features-upgrade-considerations-eleventy-version-2/) if applying to an existing project.\n\n\u003csmall\u003eInterested in using LightningCSS in 11ty without Sass? You'll want my [Eleventy LightningCSS plugin](https://github.com/5t3ph/eleventy-plugin-lightningcss) instead!\u003c/small\u003e\n\n## Usage\n\nInstall the plugin package:\n\n```bash\nnpm install @11tyrocks/eleventy-plugin-sass-lightningcss\n```\n\nThen, include it in your `.eleventy.js` config file:\n\n```js\nconst eleventySass = require(\"@11tyrocks/eleventy-plugin-sass-lightningcss\");\n\nmodule.exports = (eleventyConfig) =\u003e {\n  // If you already have a config, add just the following line\n  eleventyConfig.addPlugin(eleventySass);\n};\n```\n\n⚠️ **Important**: The files will end up in `collections.all` and appear in places like RSS feeds where you may be using the \"all\" collection. To prevent that, [a temporary workaround](https://github.com/11ty/eleventy/discussions/2850#discussioncomment-5254892) is to create a directory data file to exclude your Sass files.\n\nPlace the following in the directory containing your Sass files. As an example, for a directory called `css` the file would be called `css/css.json`:\n\n```js\n{\n  \"eleventyExcludeFromCollections\": true\n}\n```\n\nThen, write your Sass using any organization pattern you like as long as it lives within your defined [Eleventy input directory](https://www.11ty.dev/docs/config/#input-directory).\n\n\u003e **Note**\n\u003e If you are already using PostCSS or Parcel, you will be doubling efforts with this plugin and should not add it.\n\n## How does it work?\n\nThis plugin uses Eleventy's `addTemplateFormats` and `addExtension` features to essentiallly recognize Sass as a first-class templating language, and add custom processing. Since it makes Sass into a templating language, changes are applied during local development hot-reloading without a delay or requiring a manual browser refresh.\n\nThe docs actually show [the basics of including Sass](https://www.11ty.dev/docs/languages/custom/) but this plugin steps it up a notch by adding the processing using LightningCSS. This both minifies, prefixes, and enables transpiling based on your browserslist (or the included default) to gain future-CSS support today, with graceful upgrading as browser support improves.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5t3ph%2Feleventy-plugin-sass-lightningcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5t3ph%2Feleventy-plugin-sass-lightningcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5t3ph%2Feleventy-plugin-sass-lightningcss/lists"}