{"id":20476417,"url":"https://github.com/thoughtspile/mini-css-extract-plugin-order-repro","last_synced_at":"2026-06-06T11:31:37.774Z","repository":{"id":81064595,"uuid":"411716170","full_name":"thoughtspile/mini-css-extract-plugin-order-repro","owner":"thoughtspile","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-29T18:24:52.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T03:18:54.796Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thoughtspile.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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":"2021-09-29T14:52:52.000Z","updated_at":"2021-09-29T18:24:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"96734344-7de1-4aef-b2c0-ecea87eb3ff3","html_url":"https://github.com/thoughtspile/mini-css-extract-plugin-order-repro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtspile%2Fmini-css-extract-plugin-order-repro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtspile%2Fmini-css-extract-plugin-order-repro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtspile%2Fmini-css-extract-plugin-order-repro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtspile%2Fmini-css-extract-plugin-order-repro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoughtspile","download_url":"https://codeload.github.com/thoughtspile/mini-css-extract-plugin-order-repro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242048329,"owners_count":20063400,"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-15T15:20:30.396Z","updated_at":"2026-06-06T11:31:37.734Z","avatar_url":"https://github.com/thoughtspile.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repo reproduces mini-css-extract-plugin import ordering issue.\n\n- `repro` is a fake node_module — it has a `package.json` with `\"sideEffects\": \"*.css\"`.\n- `repro` exports 2 React components:\n    - `Text` is `\u003cdiv className={'Text' + props.className}\u003e`, `.Text` is black\n    - `RedText` imports `Text` and passes `\u003cText className=\"RedText\"\u003e`, and `.RedText` overrides\n- I expect the CSS bundle to be in depth-first order: `.Text { color: black } .RedText { color: red }`\n- The CSS bundle is `.RedText { color: red } .Text { color: black }` instead.\n\nTo reproduce yourself:\n\n- `yarn install`\n- `yarn reproduce`\n\nThe issue magically disappears if I remove `sideEffects` from `repro`'s `package.json` (but not by setting it to `[]`, `[\"*.js\"]` (anything not matching css) or `false`)\n\nAdding an explicit `import '../Text/Text.css';` in `RedText.js` also does the trick.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtspile%2Fmini-css-extract-plugin-order-repro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtspile%2Fmini-css-extract-plugin-order-repro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtspile%2Fmini-css-extract-plugin-order-repro/lists"}