{"id":17875314,"url":"https://github.com/noyobo/esbuild-plugin-auto-css-modules","last_synced_at":"2025-10-19T18:14:41.424Z","repository":{"id":170899131,"uuid":"643701590","full_name":"noyobo/esbuild-plugin-auto-css-modules","owner":"noyobo","description":"Automatically import styles filename mark CSS modules. After adding the flag, the build tool can distinguish whether to enable css Modules","archived":false,"fork":false,"pushed_at":"2023-09-27T10:42:14.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T17:50:48.513Z","etag":null,"topics":["esbuild-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/noyobo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-05-22T01:12:16.000Z","updated_at":"2023-05-30T08:29:22.000Z","dependencies_parsed_at":"2024-10-28T05:53:41.812Z","dependency_job_id":"62f620c1-a985-4921-9b8e-54dbc3562bd6","html_url":"https://github.com/noyobo/esbuild-plugin-auto-css-modules","commit_stats":null,"previous_names":["noyobo/esbuild-plugin-auto-css-modules"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyobo%2Fesbuild-plugin-auto-css-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyobo%2Fesbuild-plugin-auto-css-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyobo%2Fesbuild-plugin-auto-css-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyobo%2Fesbuild-plugin-auto-css-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noyobo","download_url":"https://codeload.github.com/noyobo/esbuild-plugin-auto-css-modules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246911467,"owners_count":20853658,"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":["esbuild-plugin"],"created_at":"2024-10-28T11:14:27.330Z","updated_at":"2025-10-19T18:14:36.402Z","avatar_url":"https://github.com/noyobo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esbuild-plugin-auto-css-modules\n\n[![npm version](https://badge.fury.io/js/esbuild-plugin-auto-css-modules.svg)](https://badge.fury.io/js/esbuild-plugin-auto-css-modules)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![issues](https://img.shields.io/github/issues/noyobo/esbuild-plugin-auto-css-modules.svg)](https://github.com/noyobo/esbuild-plugin-auto-css-modules/issues)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#contributing)\n[![downloads](https://img.shields.io/npm/dm/esbuild-plugin-auto-css-modules.svg)](https://www.npmjs.com/package/esbuild-plugin-auto-css-modules)\n[![Code Coverage](https://codecov.io/gh/noyobo/esbuild-plugin-auto-css-modules/branch/main/graph/badge.svg)](https://codecov.io/gh/noyobo/esbuild-plugin-auto-css-modules)\n[![Node.js CI](https://github.com/noyobo/esbuild-plugin-auto-css-modules/actions/workflows/node.js.yml/badge.svg)](https://github.com/noyobo/esbuild-plugin-auto-css-modules/actions/workflows/node.js.yml)\n\nAutomatically import styles filename mark CSS modules. After adding the flag, the build tool can distinguish whether to enable css Modules\n\n## Install\n\n```bash\nnpm i esbuild-plugin-auto-css-modules -D\n```\n\n## Usage\n\n```js\nimport { build } from 'esbuild'\nimport { autoCssModules } from 'esbuild-plugin-auto-css-modules'\n\nbuild({\n  entryPoints: ['src/index.js'],\n  bundle: true,\n  outfile: 'dist/index.js',\n  plugins: [autoCssModules()],\n}).catch(() =\u003e process.exit(1))\n```\n\n```js\n// before\nimport styles from './index.css';\n```\n\n```js\n// after\nimport styles from './index.css?modules';\n```\n\n## Options\n\n```ts\ntype Options = {\n    filter?: RegExp; // default: /\\.([tj]sx?)$/\n    flag?: string; // default: modules\n    ignore?: RegExp | ((filename: string) =\u003e boolean); // default: null\n}\n```\n\n\n## Related\n\n- [esbuild-style-loader](https://npmjs.com/package/esbuild-style-loader) - esbuild style loader plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoyobo%2Fesbuild-plugin-auto-css-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoyobo%2Fesbuild-plugin-auto-css-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoyobo%2Fesbuild-plugin-auto-css-modules/lists"}