{"id":16252987,"url":"https://github.com/neki-dev/vite-plugin-svg-inject","last_synced_at":"2025-04-08T12:43:13.493Z","repository":{"id":57678823,"uuid":"477875238","full_name":"neki-dev/vite-plugin-svg-inject","owner":"neki-dev","description":"⚙️ Inject SVG content into components","archived":false,"fork":false,"pushed_at":"2023-01-09T16:59:07.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-30T16:45:03.818Z","etag":null,"topics":["icon","inject","solid","svg","vite"],"latest_commit_sha":null,"homepage":"","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/neki-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-04T21:13:26.000Z","updated_at":"2022-10-03T19:57:24.000Z","dependencies_parsed_at":"2023-02-08T13:01:51.293Z","dependency_job_id":null,"html_url":"https://github.com/neki-dev/vite-plugin-svg-inject","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/neki-dev%2Fvite-plugin-svg-inject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neki-dev%2Fvite-plugin-svg-inject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neki-dev%2Fvite-plugin-svg-inject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neki-dev%2Fvite-plugin-svg-inject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neki-dev","download_url":"https://codeload.github.com/neki-dev/vite-plugin-svg-inject/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247846170,"owners_count":21005973,"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":["icon","inject","solid","svg","vite"],"created_at":"2024-10-10T15:15:36.614Z","updated_at":"2025-04-08T12:43:13.465Z","avatar_url":"https://github.com/neki-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### ⛔ Package is deprecated\nPlease, use [vite-plugin-svgr](https://www.npmjs.com/package/vite-plugin-svgr)\n\n.\n\n## ⚙️ Vite plugin SVG inject\n[![Npm package version](https://badgen.net/npm/v/vite-plugin-svg-inject)](https://npmjs.com/package/vite-plugin-svg-inject)\n[![Small size](https://img.badgesize.io/neki-dev/vite-plugin-svg-inject/master/src/index.js)](https://github.com/neki-dev/vite-plugin-svg-inject/blob/master/src/index.js)\n\nInject SVG content into components\n\n.\n\n* ### Install\n\n```sh\nnpm i vite-plugin-svg-inject -D\n```\n\n* ### Configure\n\n```js\nimport { defineConfig } from \"vite\";\nimport SVGInjectPlugin from \"vite-plugin-svg-inject\";\n\nexport default defineConfig({\n  plugins: [\n    // Target:\n    // - \"react\" - If JSX library is React\n    // - \"other\" (default) - For others libraries\n    SVGInjectPlugin(target)\n  ],\n})\n```\n\n* ### Example\n\n```js\nimport MyIcon from './images/icon.svg';\n\nfunction MyComponent() {\n  return (\n    \u003cdiv\u003e\n      \u003cMyIcon width=\"32\" fill=\"red\" /\u003e\n    \u003c/div\u003e\n  );\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneki-dev%2Fvite-plugin-svg-inject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneki-dev%2Fvite-plugin-svg-inject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneki-dev%2Fvite-plugin-svg-inject/lists"}