{"id":13508535,"url":"https://github.com/svg/svgo-loader","last_synced_at":"2025-05-15T09:08:58.531Z","repository":{"id":24558740,"uuid":"27965916","full_name":"svg/svgo-loader","owner":"svg","description":"svgo loader for webpack","archived":false,"fork":false,"pushed_at":"2024-08-30T10:49:38.000Z","size":527,"stargazers_count":308,"open_issues_count":1,"forks_count":34,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-06T09:47:16.695Z","etag":null,"topics":[],"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/svg.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"svgo"}},"created_at":"2014-12-13T16:12:45.000Z","updated_at":"2025-04-01T23:23:40.000Z","dependencies_parsed_at":"2024-12-07T18:32:35.247Z","dependency_job_id":"7fdede0a-e8eb-41fd-a8e5-241c21ed86d0","html_url":"https://github.com/svg/svgo-loader","commit_stats":{"total_commits":64,"total_committers":17,"mean_commits":3.764705882352941,"dds":0.6875,"last_synced_commit":"a63c095c963440157aa5a94baa45c7d83f747ca5"},"previous_names":["rpominov/svgo-loader"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svg%2Fsvgo-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svg%2Fsvgo-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svg%2Fsvgo-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svg%2Fsvgo-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svg","download_url":"https://codeload.github.com/svg/svgo-loader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704569,"owners_count":20982298,"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-08-01T02:00:54.476Z","updated_at":"2025-04-08T06:31:12.139Z","avatar_url":"https://github.com/svg.png","language":"JavaScript","funding_links":["https://opencollective.com/svgo"],"categories":["JavaScript","Plugins"],"sub_categories":["Rspack Loaders"],"readme":"# [svgo](https://github.com/svg/svgo) loader for [webpack](https://github.com/webpack/webpack)\n\n## Install\n\n```\n$ npm install svgo-loader --save-dev\n```\n\n... or with Yarn\n\n```\n$ yarn add svgo-loader -D\n```\n\n## Usage\n\n[Documentation: Using loaders](https://webpack.js.org/concepts/loaders/#using-loaders)\n\n```js\nmodule.exports = {\n  ...,\n  module: {\n    rules: [\n      {\n        test: /\\.svg$/,\n        type: 'asset',\n        loader: 'svgo-loader'\n      }\n    ]\n  }\n}\n```\n\nBy default svgo-loader uses config from `svgo.config.js` similar to svgo cli.\nSee [how to configure svgo](https://github.com/svg/svgo#configuration).\n\nSpecify configFile option to load custom config module:\n\n```js\nmodule.exports = {\n  ...,\n  module: {\n    rules: [\n      {\n        test: /\\.svg$/,\n        type: 'asset',\n        loader: 'svgo-loader',\n        options: {\n          configFile: './scripts/svgo.config.js'\n        }\n      }\n    ]\n  }\n}\n```\n\nor to disable loading config:\n\n```js\nmodule.exports = {\n  ...,\n  module: {\n    rules: [\n      {\n        test: /\\.svg$/,\n        type: 'asset',\n        loader: 'svgo-loader',\n        options: {\n          configFile: false\n        }\n      }\n    ]\n  }\n}\n```\n\nYou can also specify options which override loaded from config\n\n```js\nmodule.exports = {\n  ...,\n  module: {\n    rules: [\n      {\n        test: /\\.svg$/,\n        type: 'asset',\n        loader: 'svgo-loader',\n        options: {\n          multipass: true,\n          js2svg: {\n            indent: 2,\n            pretty: true,\n          }\n        }\n      }\n    ]\n  }\n}\n```\n\n## License and Copyright\n\nThis software is released under the terms of the [MIT license](https://github.com/svg/svgo-loader/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvg%2Fsvgo-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvg%2Fsvgo-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvg%2Fsvgo-loader/lists"}