{"id":13727408,"url":"https://github.com/cometkim/gatsby-plugin-linaria","last_synced_at":"2025-04-05T10:08:25.496Z","repository":{"id":38436031,"uuid":"152458005","full_name":"cometkim/gatsby-plugin-linaria","owner":"cometkim","description":"Gatsby plugin for styling with Linaria","archived":false,"fork":false,"pushed_at":"2024-10-25T13:39:56.000Z","size":3531,"stargazers_count":57,"open_issues_count":13,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T14:50:41.784Z","etag":null,"topics":["css-in-js","gatsby","gatsby-plugin","linaria","react"],"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/cometkim.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":"2018-10-10T16:50:45.000Z","updated_at":"2023-12-21T09:06:30.000Z","dependencies_parsed_at":"2023-01-21T13:03:06.667Z","dependency_job_id":"a5943b9a-97a0-4fbb-9d7f-3c5a86e2d1e0","html_url":"https://github.com/cometkim/gatsby-plugin-linaria","commit_stats":{"total_commits":197,"total_committers":10,"mean_commits":19.7,"dds":0.6954314720812182,"last_synced_commit":"f51bdee800d38d99e13124f412b76660e073bf8c"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cometkim%2Fgatsby-plugin-linaria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cometkim%2Fgatsby-plugin-linaria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cometkim%2Fgatsby-plugin-linaria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cometkim%2Fgatsby-plugin-linaria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cometkim","download_url":"https://codeload.github.com/cometkim/gatsby-plugin-linaria/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318744,"owners_count":20919484,"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-in-js","gatsby","gatsby-plugin","linaria","react"],"created_at":"2024-08-03T01:03:54.503Z","updated_at":"2025-04-05T10:08:25.481Z","avatar_url":"https://github.com/cometkim.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# gatsby-plugin-linaria\n\n[![npm](https://img.shields.io/npm/v/gatsby-plugin-linaria)](https://npm.im/gatsby-plugin-linaria)\n[![npm downloads](https://img.shields.io/npm/dm/gatsby-plugin-linaria)](https://npm.im/gatsby-plugin-linaria)\n\nGatsby plugin for styling with [Linaria](https://linaria.dev/)\n\n## Install\n\nInstall the plugin and Linaria:\n\n```bash\nyarn add gatsby-plugin-linaria @linaria/core @linaria/react\n```\n\nNext, add the plugin to `gatsby-config.js`:\n\n```js\nplugins: [\n  'gatsby-plugin-linaria',\n]\n```\n\n## TypeScript\n\nIf you're using TypeScript, make sure to include `gatsby-plugin-typescript` **before** `gatsby-plugin-linaria` in your config:\n\n```js\nplugins: [\n  'gatsby-plugin-typescript',\n  'gatsby-plugin-linaria',\n]\n```\n\nSee [#13](https://github.com/cometkim/gatsby-plugin-linaria/issues/13#issuecomment-633154216) for more details.\n\n## Customize Loader Options\n\nYou can customize [linaria loader options](https://github.com/callstack/linaria/blob/master/docs/BUNDLERS_INTEGRATION.md#options)\n\n```js\n{\n  resolve: 'gatsby-plugin-linaria',\n  options: {\n    loaderOptions: {\n      // ... Specify options here\n    },\n  },\n}\n```\n\n## Critical CSS Extraction\n\nGatsbyJS \u0026 Linaria extract your stylesheet and inject into the `\u003chead\u003e` by default. So, you don't need to worry about the SSR \u0026 FOUC.\n\nHowever, the extracted stylesheet would be huge for large site, because it includes css used by whole pages/components\n\nThis plugin provide an option `extractCritical` that use `@linaria/server` API behind the scene\n\n```js\n{\n  resolve: 'gatsby-plugin-linaria',\n  options: {\n    extractCritical: true, // false by default.\n  },\n}\n```\n\nWhen you opt-in this feature, only **Critical CSS** is injected into the `\u003chead\u003e`. And loading full CSS will be deferred for later paint or navigations.\n\nLighthouse might complain you have duplicated style rules. (It's OK)\n\nSee [this](https://github.com/cometkim/gatsby-plugin-linaria/issues/94#issuecomment-654760281) for more detailed explanation.\n\n# Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n\n## LICENSE\n\nMIT\n\n----\n\nHappy styling! :art:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcometkim%2Fgatsby-plugin-linaria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcometkim%2Fgatsby-plugin-linaria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcometkim%2Fgatsby-plugin-linaria/lists"}