{"id":14990553,"url":"https://github.com/indooorsman/esbuild-css-modules-plugin","last_synced_at":"2025-05-16T07:05:27.729Z","repository":{"id":39679397,"uuid":"344708930","full_name":"indooorsman/esbuild-css-modules-plugin","owner":"indooorsman","description":"A esbuild plugin to bundle css modules into js(x)/ts(x)","archived":false,"fork":false,"pushed_at":"2025-01-07T08:04:05.000Z","size":188,"stargazers_count":93,"open_issues_count":4,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T16:09:00.117Z","etag":null,"topics":["css","css-modules","esbuild","esbuild-plugin","lightningcss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/indooorsman.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"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}},"created_at":"2021-03-05T05:52:21.000Z","updated_at":"2025-03-13T11:19:36.000Z","dependencies_parsed_at":"2025-01-20T06:11:32.039Z","dependency_job_id":"7dace3a1-c280-4029-bd10-993009a07a66","html_url":"https://github.com/indooorsman/esbuild-css-modules-plugin","commit_stats":{"total_commits":159,"total_committers":11,"mean_commits":"14.454545454545455","dds":"0.17610062893081757","last_synced_commit":"2ca1e813348920ae67b141cdb8ede3cd7630b953"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indooorsman%2Fesbuild-css-modules-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indooorsman%2Fesbuild-css-modules-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indooorsman%2Fesbuild-css-modules-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indooorsman%2Fesbuild-css-modules-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indooorsman","download_url":"https://codeload.github.com/indooorsman/esbuild-css-modules-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485060,"owners_count":22078767,"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":["css","css-modules","esbuild","esbuild-plugin","lightningcss"],"created_at":"2024-09-24T14:20:21.981Z","updated_at":"2025-05-16T07:05:22.717Z","avatar_url":"https://github.com/indooorsman.png","language":"JavaScript","readme":"# esbuild-css-modules-plugin\n\n[![npm version](https://img.shields.io/npm/v/esbuild-css-modules-plugin)](https://www.npmjs.com/package/esbuild-css-modules-plugin)\n[![Test](https://github.com/indooorsman/esbuild-css-modules-plugin/actions/workflows/test.yml/badge.svg)](https://github.com/indooorsman/esbuild-css-modules-plugin/actions/workflows/test.yml)\n\nA esbuild plugin to bundle css modules into js(x)/ts(x). Based on extremely fast [Lightning CSS](https://lightningcss.dev/)\n\nWorks both with `bundle: false` and `bundle: true`.\n\nIf build with `bundle: false`, `xxx.modules.css` will be transformed to `xxx.modules.css.js`.\n\nSee [index.d.ts](https://github.com/indooorsman/esbuild-css-modules-plugin/blob/main/index.d.ts) for all settings \u0026 [`./test/test.js`](https://github.com/indooorsman/esbuild-css-modules-plugin/blob/main/test/test.js) for examples.\n\n## Install\n\n```shell\nnpm i -D esbuild-css-modules-plugin\n```\n\nor\n\n```shell\nyarn add -D esbuild-css-modules-plugin\n```\n\n## Usage\n\n```js\nimport esbuild from 'esbuild';\nimport CssModulesPlugin from 'esbuild-css-modules-plugin';\n\nesbuild.build({\n  plugins: [\n    CssModulesPlugin({\n      // @see https://github.com/indooorsman/esbuild-css-modules-plugin/blob/main/index.d.ts for more details\n      force: true,\n      emitDeclarationFile: true,\n      localsConvention: 'camelCaseOnly',\n      namedExports: true,\n      inject: false\n    })\n  ]\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findooorsman%2Fesbuild-css-modules-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findooorsman%2Fesbuild-css-modules-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findooorsman%2Fesbuild-css-modules-plugin/lists"}