{"id":19450947,"url":"https://github.com/rixo/rollup-plugin-postcss-hot","last_synced_at":"2025-04-25T04:30:21.224Z","repository":{"id":43949417,"uuid":"261217836","full_name":"rixo/rollup-plugin-postcss-hot","owner":"rixo","description":"Fork of rollup-plugin-postcss with added HMR support","archived":false,"fork":false,"pushed_at":"2024-05-26T13:10:55.000Z","size":4158,"stargazers_count":5,"open_issues_count":12,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T15:44:41.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/rixo.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":"2020-05-04T15:08:19.000Z","updated_at":"2024-05-24T09:30:40.000Z","dependencies_parsed_at":"2024-11-10T16:41:16.021Z","dependency_job_id":"382a8afe-0e01-41f6-958d-35fe352a3742","html_url":"https://github.com/rixo/rollup-plugin-postcss-hot","commit_stats":{"total_commits":204,"total_committers":34,"mean_commits":6.0,"dds":0.4558823529411765,"last_synced_commit":"9cc152a8859b30979346a856c07bef0b6992d664"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Frollup-plugin-postcss-hot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Frollup-plugin-postcss-hot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Frollup-plugin-postcss-hot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Frollup-plugin-postcss-hot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rixo","download_url":"https://codeload.github.com/rixo/rollup-plugin-postcss-hot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366722,"owners_count":21418772,"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":[],"created_at":"2024-11-10T16:39:40.441Z","updated_at":"2025-04-25T04:30:20.509Z","avatar_url":"https://github.com/rixo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup-plugin-postcss-hot\n\nThis is a fork of [rollup-plugin-postcss](https://github.com/egoist/rollup-plugin-postcss) with added support for hot CSS injection during HMR, with [rollup-plugin-hot ](https://github.com/rixo/rollup-plugin-hot).\n\nThe intention is to provide a fillgap solution for HMR and, ideally, to integrate HMR support into the original plugin. If someone is interested is pushing Rollup's HMR cause by discussing this and submitting clean PRs to the original project, that would be huge!\n\n**NOTE** Hot CSS injection only works when the [inject](https://github.com/egoist/rollup-plugin-postcss#inject) option is `true`.\n\n**NOTE 2** This has only be tested with default options, so if you find a bug with HMR support, please open an issue _in this repo_ (not `rollup-plugin-postcss` repo).\n\nA [basic example](https://github.com/rixo/rollup-plugin-hot/blob/90f7eb8f4fb4a9d550c94283822e7d12c5c26980/example/rollup.config.js#L44) is available in `rollup-plugin-hot`'s repository.\n\n## Install\n\n```bash\nyarn add rollup-plugin-postcss-hot --dev\n```\n\n## Usage\n\nUsage should be exactly the same as the original plugin. Please refer to `rollup-plugin-postcss`'s docs.\n\nThere's only a `hot` option added:\n\n```js\nconst HOT = !!process.env.HOT // for example\n\n...\n\npostcss({\n  hot: HOT,\n  extract: path.resolve(''),\n  sourceMap: true,\n}),\n```\n\nWhen the `hot` option is `true`, [inject](https://github.com/egoist/rollup-plugin-postcss#inject) option will be forcefully enabled and, if you have [extract](https://github.com/egoist/rollup-plugin-postcss#extract) option (like in the above example), an empty file will be written in this location.\n\nThe empty file avoid a 404 if your app tries to load the file normally. It is emptied because otherwise the content of the file initially loaded by the browser could conflict with CSS inject by HMR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixo%2Frollup-plugin-postcss-hot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frixo%2Frollup-plugin-postcss-hot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixo%2Frollup-plugin-postcss-hot/lists"}