{"id":25817231,"url":"https://github.com/debonex/esbuild-plugin-raw-css","last_synced_at":"2026-05-11T07:33:00.123Z","repository":{"id":65349971,"uuid":"589950769","full_name":"Debonex/esbuild-plugin-raw-css","owner":"Debonex","description":"esbuild plugin for importing css files as minified raw text.","archived":false,"fork":false,"pushed_at":"2023-01-17T10:24:00.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T00:05:10.355Z","etag":null,"topics":["css","esbuild","esbuild-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Debonex.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}},"created_at":"2023-01-17T10:21:30.000Z","updated_at":"2023-01-17T12:40:31.000Z","dependencies_parsed_at":"2023-02-10T09:00:28.383Z","dependency_job_id":null,"html_url":"https://github.com/Debonex/esbuild-plugin-raw-css","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Debonex/esbuild-plugin-raw-css","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debonex%2Fesbuild-plugin-raw-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debonex%2Fesbuild-plugin-raw-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debonex%2Fesbuild-plugin-raw-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debonex%2Fesbuild-plugin-raw-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Debonex","download_url":"https://codeload.github.com/Debonex/esbuild-plugin-raw-css/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debonex%2Fesbuild-plugin-raw-css/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266665790,"owners_count":23964973,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["css","esbuild","esbuild-plugin"],"created_at":"2025-02-28T06:33:03.795Z","updated_at":"2026-05-11T07:33:00.094Z","avatar_url":"https://github.com/Debonex.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esbuild-plugin-raw-css\r\n\r\nesbuild plugin for importing css files as minified raw text.\r\n\r\n## Usage\r\n\r\n```css\r\n/* base.css */\r\n.one {\r\n  background-color: \"#fff\";\r\n}\r\n```\r\n\r\n```js\r\n// index.js\r\nimport base from \"./base.css?raw\";\r\nconsole.log(base); // \".one{background-color:\"#fff\"}\\n\"\r\n```\r\n\r\n```js\r\n// build.js\r\nimport esbuild from \"esbuild\";\r\nimport rawCssPlugin from \"esbuild-plugin-raw-css\";\r\n\r\nesbuild.build({\r\n  entryPoints: [\"index.js\"],\r\n  bundle: true,\r\n  outfile: \"out.js\",\r\n  plugins: [\r\n    rawCssPlugin({\r\n      // optional\r\n      minify: false,\r\n    }),\r\n  ],\r\n});\r\n```\r\n\r\n## With typescript\r\n\r\nAdd type declaration for `*.css?raw` in your project.\r\n\r\n```ts\r\ndeclare module \"*.css?raw\" {\r\n  const src: string;\r\n  export default src;\r\n}\r\n```\r\n\r\n## API Reference\r\n\r\n```ts\r\ntype RawCssPluginOptions = {\r\n  /** if minify css text @default true */\r\n  minify?: boolean;\r\n};\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebonex%2Fesbuild-plugin-raw-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebonex%2Fesbuild-plugin-raw-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebonex%2Fesbuild-plugin-raw-css/lists"}