{"id":14990670,"url":"https://github.com/nyancss/nyancss-css-modules-loader","last_synced_at":"2025-04-12T02:37:53.599Z","repository":{"id":22308175,"uuid":"95883929","full_name":"nyancss/nyancss-css-modules-loader","owner":"nyancss","description":"Nyan CSS webpack loader that converts CSS Modules into React/Preact components","archived":false,"fork":false,"pushed_at":"2022-12-10T19:20:08.000Z","size":1944,"stargazers_count":8,"open_issues_count":21,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T02:37:44.057Z","etag":null,"topics":["css","css-modules","nyancss","preact","react","styled-components","webpack","webpack-loader"],"latest_commit_sha":null,"homepage":"","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/nyancss.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}},"created_at":"2017-06-30T11:52:03.000Z","updated_at":"2024-05-17T16:46:16.000Z","dependencies_parsed_at":"2023-01-12T08:30:33.323Z","dependency_job_id":null,"html_url":"https://github.com/nyancss/nyancss-css-modules-loader","commit_stats":null,"previous_names":["kossnocorp/decss-loader"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyancss%2Fnyancss-css-modules-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyancss%2Fnyancss-css-modules-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyancss%2Fnyancss-css-modules-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyancss%2Fnyancss-css-modules-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nyancss","download_url":"https://codeload.github.com/nyancss/nyancss-css-modules-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248507073,"owners_count":21115530,"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","nyancss","preact","react","styled-components","webpack","webpack-loader"],"created_at":"2024-09-24T14:20:34.041Z","updated_at":"2025-04-12T02:37:53.581Z","avatar_url":"https://github.com/nyancss.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @nyancss/css-modules-loader\n\nNyan CSS webpack loader that converts CSS Modules (provided by css-loader) into components (React/Preact/Vue.js/etc.).\n\nFor the introduction into Nyan CSS and other docs, see [the main repo](https://github.com/nyancss/nyancss). Read further for instruction on setting up the loader.\n\n## Installation\n\n### React/Preact\n\n```bash\nnpm install --save-dev @nyancss/css-modules-loader @nyancss/react\n# or using yarn\nyarn add --dev @nyancss/css-modules-loader @nyancss/react\n```\n\n### Vue.js\n\n```bash\nnpm install --save-dev @nyancss/css-modules-loader @nyancss/vue\n# or using yarn\nyarn add --dev @nyancss/css-modules-loader @nyancss/vue\n```\n\n### Class names\n\n```bash\nnpm install --save-dev @nyancss/css-modules-loader @nyancss/class-names\n# or using yarn\nyarn add --dev @nyancss/css-modules-loader @nyancss/class-names\n```\n\n## Configuration\n\n### Basic confuguration\n\n```js\n// ...\n{\n  test: /\\.css$/,\n  use: [\n    'style-loader',\n    '@nyancss/css-modules-loader/REPLACE_ME', // 👈 Add the loader\n    // Use '@nyancss/css-modules-loader/react' for React\n    // Use '@nyancss/css-modules-loader/preact' for Preact\n    // Use '@nyancss/css-modules-loader/vue' for Vue\n    // Use '@nyancss/css-modules-loader/class-names' for class names\n    { loader: 'css-loader', options: { modules: true } }\n  ]\n},\n// ...\n```\n\n### Usage with [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin)\n\n```js\n// ...\n{\n  test: /\\.css$/,\n  use: [\n    '@nyancss/css-modules-loader/REPLACE_ME', // 👈 The loader **before** the plugin\n    { loader: MiniCssExtractPlugin.loader }, // 👈 mini-css-extract-plugin\n    { loader: 'css-loader', options: { modules: true } }\n  ]\n},\n// ...\n```\n\n## Related packages\n\n- [@nyancss/css-modules](https://github.com/nyancss/nyancss-css-modules) - the package used to convert CSS Modules to Nyan CSS.\n- [@nyancss/react](https://github.com/nyancss/nyancss-react) - the package used to convert Nyan CSS to React/Preact components.\n- [@nyancss/vue](https://github.com/nyancss/nyancss-vue) - the package used to convert Nyan CSS to Vue.js components.\n- [@nyancss/class-names](https://github.com/nyancss/nyancss-class-names) - the package used to convert Nyan CSS to class names functions.\n\n## Changelog\n\nSee [the changelog](./CHANGELOG.md).\n\n## License\n\n[MIT © Sasha Koss](https://kossnocorp.mit-license.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyancss%2Fnyancss-css-modules-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyancss%2Fnyancss-css-modules-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyancss%2Fnyancss-css-modules-loader/lists"}