{"id":31645719,"url":"https://github.com/umijs/swc-plugin-auto-css-modules","last_synced_at":"2025-10-07T05:16:14.294Z","repository":{"id":65102263,"uuid":"581993780","full_name":"umijs/swc-plugin-auto-css-modules","owner":"umijs","description":"Auto css modules plugin for swc","archived":false,"fork":false,"pushed_at":"2024-02-28T07:52:12.000Z","size":155,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T20:50:21.337Z","etag":null,"topics":["swc-plugin"],"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/umijs.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-12-25T07:58:15.000Z","updated_at":"2025-05-29T22:13:36.000Z","dependencies_parsed_at":"2024-02-28T08:50:15.307Z","dependency_job_id":null,"html_url":"https://github.com/umijs/swc-plugin-auto-css-modules","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"93376f943ed80963dc6f1fe2a35c06eab8181705"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/umijs/swc-plugin-auto-css-modules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fswc-plugin-auto-css-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fswc-plugin-auto-css-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fswc-plugin-auto-css-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fswc-plugin-auto-css-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umijs","download_url":"https://codeload.github.com/umijs/swc-plugin-auto-css-modules/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fswc-plugin-auto-css-modules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722757,"owners_count":26034463,"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-10-07T02:00:06.786Z","response_time":59,"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":["swc-plugin"],"created_at":"2025-10-07T05:15:54.997Z","updated_at":"2025-10-07T05:16:14.289Z","avatar_url":"https://github.com/umijs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swc-plugin-auto-css-modules\n\nAuto css modules plugin for swc.\n\n## Install\n\n```bash\n  pnpm i -D swc-plugin-auto-css-modules\n```\n\nYou should install the following versions:\n\n|`@swc/core` version|working version|\n|:-:|:-:|\n| `latest` \u003e version \u003e= `1.4.0`|`swc-plugin-auto-css-modules@1.6.0`|\n| `1.3.108` \u003e version \u003e= `1.3.106`|Not support|\n| `1.3.106` \u003e version \u003e= `1.3.63`|`swc-plugin-auto-css-modules@1.5.0`|\n| `1.3.63` \u003e version \u003e= `1.3.41`|`swc-plugin-auto-css-modules@1.4.0`|\n| `1.3.41` \u003e version \u003e= `1.3.24`|`swc-plugin-auto-css-modules@1.3.0`|\n\n## Usage\n\n```diff\n// swc config\n{\n  jsc: {\n    experimental: {\n      plugins: [\n+       ['swc-plugin-auto-css-modules', {}]\n      ],\n    },\n  }\n}\n```\n\n### Auto css modules\n\nThis plugin will auto add the `?modules` suffix.\n\n```ts\nimport styles from './index.less'\n// to\nimport styles from './index.less?modules'\n```\n\n### Lock `core-js` import\n\nLock `core-js` import by config `lock_core_js_pkg_path`.\n\n```ts\nplugins: [\n  [\n    'swc-plugin-auto-css-modules',\n    { lock_core_js_pkg_path: dirname(require.resolve('core-js/package.json')) },\n  ],\n]\n```\n\n```ts\nimport 'core-js/es/modules'\n// to\nimport '/node_modules/**/core-js/es/modules'\n```\n\n## Config\n\nSee [types](./index.d.ts) file\n\n```ts\nimport type { ISwcPluginAutoCssModulesConfig } from 'swc-plugin-auto-css-modules'\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumijs%2Fswc-plugin-auto-css-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumijs%2Fswc-plugin-auto-css-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumijs%2Fswc-plugin-auto-css-modules/lists"}