{"_id":"rspack-plugin-svg-sprite","_rev":"7-0ddf3d9f44f7530ed94ee5527e2aa4de","name":"rspack-plugin-svg-sprite","dist-tags":{"latest":"1.5.1"},"versions":{"1.1.1":{"name":"rspack-plugin-svg-sprite","version":"1.1.1","keywords":["rspack","rspack-plugin","rspack-loader","svg","svg-sprite","svg-sprite-loader","svg-icon","sprite","sprite-sheet","icon","loader","plugin","webpack","webpack5","extract","inline","symbol"],"author":{"name":"Yichen Zhu"},"license":"MIT","_id":"rspack-plugin-svg-sprite@1.1.1","maintainers":[{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"}],"homepage":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite#readme","bugs":{"url":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/issues"},"dist":{"shasum":"8693eec11570d2260a99ecbe258e94942e56c993","tarball":"https://registry.npmjs.org/rspack-plugin-svg-sprite/-/rspack-plugin-svg-sprite-1.1.1.tgz","fileCount":23,"integrity":"sha512-THuN+29HljVuT6Yukz2xOCxh0WfUqfQPJhtb9K7sWUBEbzp/hB3KJqgMJ+YcNQgkEG5dQ3mE9oCrx09sNAtfGg==","signatures":[{"sig":"MEUCIQCXPsy1i9P0nLtMA4rGViMWL/UoS9+AO5Pk+EsiiEPILAIgQNevYB1XQETMw3N2XFXi7jCchgnS5YGmZJk6YQVpKwQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44413},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./loader":{"types":"./dist/loader.d.ts","default":"./dist/loader.js"},"./plugin":{"types":"./dist/plugin.d.ts","default":"./dist/plugin.js"},"./runtime/symbol":{"types":"./dist/runtime/symbol.d.ts","default":"./dist/runtime/symbol.js"},"./runtime/browser-sprite":{"types":"./dist/runtime/browser-sprite.d.ts","default":"./dist/runtime/browser-sprite.js"}},"gitHead":"85f26680b94363eadcb45d1e8031661427761238","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github"],"branches":["main"]},"scripts":{"lint":"eslint src/","test":"tsc && rstest run","build":"tsc","format":"prettier --write .","prepare":"husky","test:ci":"tsc && rstest run --coverage","lint:fix":"eslint src/ --fix","typecheck":"tsc --noEmit","dev:rspack":"pnpm --filter svg-sprite-consumer-demo dev","dev:webpack":"pnpm --filter svg-sprite-webpack-demo dev","format:check":"prettier --check .","prepublishOnly":"pnpm build"},"_npmUser":{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"},"repository":{"url":"git+https://github.com/yichenzhu1337/rspack-plugin-svg-sprite.git","type":"git"},"_npmVersion":"10.9.4","description":"SVG sprite loader and plugin for Rspack — drop-in replacement for svg-sprite-loader with inline and extract mode support","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.29.3","devDependencies":{"husky":"^9.1.7","eslint":"^10.0.1","prettier":"^3.8.1","@eslint/js":"^10.0.1","typescript":"^5.9.3","lint-staged":"^16.2.7","@rspack/core":"^1.7.6","@rstest/core":"^0.8.5","semantic-release":"^25.0.3","typescript-eslint":"^8.56.0","eslint-config-prettier":"^10.1.8","@rstest/coverage-istanbul":"^0.2.1"},"peerDependencies":{"@rspack/core":">=0.5.0"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/rspack-plugin-svg-sprite_1.1.1_1771738623182_0.028418631046456477","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"rspack-plugin-svg-sprite","version":"1.2.0","keywords":["rspack","rspack-plugin","rspack-loader","svg","svg-sprite","svg-sprite-loader","svg-icon","sprite","sprite-sheet","icon","loader","plugin","webpack","webpack5","extract","inline","symbol"],"author":{"name":"Yichen Zhu"},"license":"MIT","_id":"rspack-plugin-svg-sprite@1.2.0","maintainers":[{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"}],"homepage":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite#readme","bugs":{"url":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/issues"},"dist":{"shasum":"06649e525fb3674e8df2cf31aa2103e96805d324","tarball":"https://registry.npmjs.org/rspack-plugin-svg-sprite/-/rspack-plugin-svg-sprite-1.2.0.tgz","fileCount":23,"integrity":"sha512-ByBH/gBe5B6FBBfNVUBq9+1b+FzbhVbRrPN1LsfonA0OfTytll8IEk6KrsWN8MBua09Ze6EjkMJSo7ws1Kd1Gw==","signatures":[{"sig":"MEQCIFJ2dt78gS5Gq/8djeqjwDhKhcYIV6TqLEBQn3MV176NAiBP1B2bHNUglMmFrHqi3cn732ELhXLgsImCHE7xnHG+Eg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44191},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./loader":{"types":"./dist/loader.d.ts","default":"./dist/loader.js"},"./plugin":{"types":"./dist/plugin.d.ts","default":"./dist/plugin.js"},"./runtime/symbol":{"types":"./dist/runtime/symbol.d.ts","default":"./dist/runtime/symbol.js"},"./runtime/browser-sprite":{"types":"./dist/runtime/browser-sprite.d.ts","default":"./dist/runtime/browser-sprite.js"}},"gitHead":"1cd36088d3f52a65f2c77fd49d4202f0b9e40a84","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github"],"branches":["main"]},"scripts":{"lint":"eslint src/","test":"tsc && rstest run","build":"tsc","format":"prettier --write .","prepare":"husky","test:ci":"tsc && rstest run --coverage","lint:fix":"eslint src/ --fix","typecheck":"tsc --noEmit","dev:rspack":"pnpm --filter svg-sprite-consumer-demo dev","dev:webpack":"pnpm --filter svg-sprite-webpack-demo dev","format:check":"prettier --check .","prepublishOnly":"pnpm build"},"_npmUser":{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"},"repository":{"url":"git+https://github.com/yichenzhu1337/rspack-plugin-svg-sprite.git","type":"git"},"_npmVersion":"10.9.4","description":"SVG sprite loader and plugin for Rspack — drop-in replacement for svg-sprite-loader with inline and extract mode support","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.29.3","devDependencies":{"husky":"^9.1.7","eslint":"^10.0.1","prettier":"^3.8.1","@eslint/js":"^10.0.1","typescript":"^5.9.3","lint-staged":"^16.2.7","@rspack/core":"^1.7.6","@rstest/core":"^0.8.5","semantic-release":"^25.0.3","typescript-eslint":"^8.56.0","eslint-config-prettier":"^10.1.8","@rstest/coverage-istanbul":"^0.2.1"},"peerDependencies":{"@rspack/core":">=0.5.0"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/rspack-plugin-svg-sprite_1.2.0_1771742169164_0.5425556093373023","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"rspack-plugin-svg-sprite","version":"1.3.0","keywords":["rspack","rspack-plugin","rspack-loader","svg","svg-sprite","svg-sprite-loader","svg-icon","sprite","sprite-sheet","icon","loader","plugin","webpack","webpack5","extract","inline","symbol"],"author":{"name":"Yichen Zhu"},"license":"MIT","_id":"rspack-plugin-svg-sprite@1.3.0","maintainers":[{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"}],"homepage":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite#readme","bugs":{"url":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/issues"},"dist":{"shasum":"fe91981f0a9915a5087dde2dacf2e6d672dc169a","tarball":"https://registry.npmjs.org/rspack-plugin-svg-sprite/-/rspack-plugin-svg-sprite-1.3.0.tgz","fileCount":23,"integrity":"sha512-4WVQJ1gvx9b2hbDx3SEWNjXhAXJADepVVO4eLDjE4l8j5MdUXOBWoYBpJx1fIDQGL7b0Tt3iZ5VZqPN9yIVetA==","signatures":[{"sig":"MEYCIQCRAUkmWiR/AeHpv9FnuGuOY15U/+sDOjiua6gjadrIqgIhAK2Cm+4Cri09zhdLPv2TKnHLqRkmj49nuPnRDE0TvGh+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48718},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./loader":{"types":"./dist/loader.d.ts","default":"./dist/loader.js"},"./plugin":{"types":"./dist/plugin.d.ts","default":"./dist/plugin.js"},"./runtime/symbol":{"types":"./dist/runtime/symbol.d.ts","default":"./dist/runtime/symbol.js"},"./runtime/browser-sprite":{"types":"./dist/runtime/browser-sprite.d.ts","default":"./dist/runtime/browser-sprite.js"}},"gitHead":"3f9dd40e1bf7d4684a4fa1b9e2d071c7bdb3ea73","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github"],"branches":["main"]},"scripts":{"lint":"eslint src/","test":"tsc && rstest run","build":"tsc","format":"prettier --write .","prepare":"husky","test:ci":"tsc && rstest run --coverage","lint:fix":"eslint src/ --fix","typecheck":"tsc --noEmit","dev:rspack":"pnpm --filter svg-sprite-consumer-demo dev","dev:webpack":"pnpm --filter svg-sprite-webpack-demo dev","format:check":"prettier --check .","prepublishOnly":"pnpm build"},"_npmUser":{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"},"repository":{"url":"git+https://github.com/yichenzhu1337/rspack-plugin-svg-sprite.git","type":"git"},"_npmVersion":"10.9.4","description":"SVG sprite loader and plugin for Rspack — drop-in replacement for svg-sprite-loader with inline and extract mode support","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.29.3","devDependencies":{"husky":"^9.1.7","eslint":"^10.0.1","prettier":"^3.8.1","@eslint/js":"^10.0.1","typescript":"^5.9.3","lint-staged":"^16.2.7","@rspack/core":"^1.7.6","@rstest/core":"^0.8.5","semantic-release":"^25.0.3","typescript-eslint":"^8.56.0","eslint-config-prettier":"^10.1.8","@rstest/coverage-istanbul":"^0.2.1"},"peerDependencies":{"@rspack/core":">=0.5.0"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/rspack-plugin-svg-sprite_1.3.0_1771745153835_0.5967198396110511","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"rspack-plugin-svg-sprite","version":"1.4.0","keywords":["rspack","rspack-plugin","rspack-loader","rsbuild","rsbuild-plugin","svg","svg-sprite","svg-sprite-loader","svg-icon","svg-icons","sprite","sprite-sheet","icon","icon-system","loader","plugin","bundler-plugin","webpack","webpack5","extract","inline","symbol","react","vue","migration","drop-in"],"author":{"name":"Yichen Zhu"},"license":"MIT","_id":"rspack-plugin-svg-sprite@1.4.0","maintainers":[{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"}],"homepage":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite#readme","bugs":{"url":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/issues"},"dist":{"shasum":"fc3d76d28e308d9f4c6f33f112168faab0622a5d","tarball":"https://registry.npmjs.org/rspack-plugin-svg-sprite/-/rspack-plugin-svg-sprite-1.4.0.tgz","fileCount":28,"integrity":"sha512-TLA/I4nFyR3GYlGhyCc1SH4gJW6OTNfMn28NmscPGFYFmEhqjz3i/CGr68sffAPHGHbPDD8qMklykeYW1O15nw==","signatures":[{"sig":"MEYCIQCrK1T9uPKwf9x0PTGDTveCpQ2aUncmkdYwoFffHp96iQIhAN23iqkjvrLjk4vkuSeg5ZCWmlRn2pWQ7bAm7onz6acE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60105},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./client":{"types":"./client.d.ts"},"./loader":{"types":"./dist/loader.d.ts","default":"./dist/loader.js"},"./plugin":{"types":"./dist/plugin.d.ts","default":"./dist/plugin.js"},"./rsbuild":{"types":"./dist/rsbuild.d.ts","default":"./dist/rsbuild.js"},"./runtime/symbol":{"types":"./dist/runtime/symbol.d.ts","default":"./dist/runtime/symbol.js"},"./runtime/browser-sprite":{"types":"./dist/runtime/browser-sprite.d.ts","default":"./dist/runtime/browser-sprite.js"}},"gitHead":"922e56cb268c9a55efffda3be7bcc260fb56c527","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github"],"branches":["main"]},"scripts":{"lint":"eslint src/","test":"tsc && rstest run","build":"tsc","format":"prettier --write .","prepare":"husky","test:ci":"tsc && rstest run --coverage","lint:fix":"eslint src/ --fix","typecheck":"tsc --noEmit","dev:rspack":"pnpm --filter svg-sprite-consumer-demo dev","dev:webpack":"pnpm --filter svg-sprite-webpack-demo dev","format:check":"prettier --check .","prepublishOnly":"pnpm build"},"_npmUser":{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"},"repository":{"url":"git+https://github.com/yichenzhu1337/rspack-plugin-svg-sprite.git","type":"git"},"_npmVersion":"10.9.4","description":"SVG sprite loader and plugin for Rspack — drop-in replacement for svg-sprite-loader with inline and extract mode support","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.29.3","devDependencies":{"husky":"^9.1.7","eslint":"^10.0.1","prettier":"^3.8.1","@eslint/js":"^10.0.1","typescript":"^5.9.3","lint-staged":"^16.2.7","@rspack/core":"^1.7.6","@rstest/core":"^0.8.5","semantic-release":"^25.0.3","typescript-eslint":"^8.56.0","eslint-config-prettier":"^10.1.8","@rstest/coverage-istanbul":"^0.2.1"},"peerDependencies":{"@rspack/core":">=0.5.0","@rsbuild/core":">=1.0.0"},"peerDependenciesMeta":{"@rspack/core":{"optional":true},"@rsbuild/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/rspack-plugin-svg-sprite_1.4.0_1772311930376_0.04738533620158014","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"rspack-plugin-svg-sprite","version":"1.3.1","keywords":["rspack","rspack-plugin","rspack-loader","rsbuild","rsbuild-plugin","svg","svg-sprite","svg-sprite-loader","svg-icon","svg-icons","sprite","sprite-sheet","icon","icon-system","loader","plugin","bundler-plugin","webpack","webpack5","extract","inline","symbol","react","vue","migration","drop-in"],"author":{"name":"Yichen Zhu"},"license":"MIT","_id":"rspack-plugin-svg-sprite@1.3.1","maintainers":[{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"}],"homepage":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite#readme","bugs":{"url":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/issues"},"dist":{"shasum":"35e127a4745a6c789f9c5bfa06622ec51949305f","tarball":"https://registry.npmjs.org/rspack-plugin-svg-sprite/-/rspack-plugin-svg-sprite-1.3.1.tgz","fileCount":28,"integrity":"sha512-HfQWO8fU/MFdC0V3RP8/GYsVI1zt583hB/m0c26qipaMXMzDa64LqS02P2ei84MEwKHBH1LvOOSpEZ0CQ/gi1A==","signatures":[{"sig":"MEUCIEJuQBVoD/rklEKTRfYsE7U8Mbu5szHCWBDzOaFz6+2vAiEArSHGA1gRY57xlGlE/GrMhO4odoEFnGQUB8ETnqT7UTs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66450},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./client":{"types":"./client.d.ts"},"./loader":{"types":"./dist/loader.d.ts","default":"./dist/loader.js"},"./plugin":{"types":"./dist/plugin.d.ts","default":"./dist/plugin.js"},"./rsbuild":{"types":"./dist/rsbuild.d.ts","default":"./dist/rsbuild.js"},"./runtime/symbol":{"types":"./dist/runtime/symbol.d.ts","default":"./dist/runtime/symbol.js"},"./runtime/browser-sprite":{"types":"./dist/runtime/browser-sprite.d.ts","default":"./dist/runtime/browser-sprite.js"}},"gitHead":"d9c8969ab8c1c3b692c46a8ac03b5b3ddd20a91c","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github"],"branches":["main"]},"scripts":{"lint":"eslint src/","test":"tsc && rstest run","build":"tsc","format":"prettier --write .","prepare":"husky","test:ci":"tsc && rstest run --coverage","lint:fix":"eslint src/ --fix","typecheck":"tsc --noEmit","dev:rspack":"pnpm --filter svg-sprite-consumer-demo dev","dev:webpack":"pnpm --filter svg-sprite-webpack-demo dev","format:check":"prettier --check .","prepublishOnly":"pnpm build"},"_npmUser":{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"},"repository":{"url":"git+https://github.com/yichenzhu1337/rspack-plugin-svg-sprite.git","type":"git"},"_npmVersion":"10.9.4","description":"SVG sprite loader and plugin for Rspack — drop-in replacement for svg-sprite-loader with inline and extract mode support","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.29.3","devDependencies":{"husky":"^9.1.7","eslint":"^10.0.1","prettier":"^3.8.1","@eslint/js":"^10.0.1","typescript":"^5.9.3","lint-staged":"^16.2.7","@rspack/core":"^1.7.6","@rstest/core":"^0.8.5","semantic-release":"^25.0.3","typescript-eslint":"^8.56.0","eslint-config-prettier":"^10.1.8","@rstest/coverage-istanbul":"^0.2.1"},"peerDependencies":{"@rspack/core":">=0.5.0","@rsbuild/core":">=1.0.0"},"peerDependenciesMeta":{"@rspack/core":{"optional":true},"@rsbuild/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/rspack-plugin-svg-sprite_1.3.1_1772439783569_0.3474345701929298","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"rspack-plugin-svg-sprite","version":"1.5.0","keywords":["rspack","rspack-plugin","rspack-loader","rsbuild","rsbuild-plugin","svg","svg-sprite","svg-sprite-loader","svg-icon","svg-icons","sprite","sprite-sheet","icon","icon-system","loader","plugin","bundler-plugin","webpack","webpack5","extract","inline","symbol","react","vue","migration","drop-in"],"author":{"name":"Yichen Zhu"},"license":"MIT","_id":"rspack-plugin-svg-sprite@1.5.0","maintainers":[{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"}],"homepage":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite#readme","bugs":{"url":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/issues"},"dist":{"shasum":"ac929b9746bbe48e4d95e66d1b2b57e47cf7d667","tarball":"https://registry.npmjs.org/rspack-plugin-svg-sprite/-/rspack-plugin-svg-sprite-1.5.0.tgz","fileCount":28,"integrity":"sha512-J3o5Dp3lWgvwEhxMJJJ2/DK9pi+dah1/aMH84L3cRPhaLexqNicxz6Z1bHdsiKwOFlIZLh07PTLF8JC6cRhIsw==","signatures":[{"sig":"MEYCIQDwiQK6r4JLispR3lUBa6cOhWHkhGzEcezNaw8GKuWjUAIhAPPpWyahZKwnRSYFm3AXpd48uouBaqtgIxVDDB6yfEEz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66450},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./client":{"types":"./client.d.ts"},"./loader":{"types":"./dist/loader.d.ts","default":"./dist/loader.js"},"./plugin":{"types":"./dist/plugin.d.ts","default":"./dist/plugin.js"},"./rsbuild":{"types":"./dist/rsbuild.d.ts","default":"./dist/rsbuild.js"},"./runtime/symbol":{"types":"./dist/runtime/symbol.d.ts","default":"./dist/runtime/symbol.js"},"./runtime/browser-sprite":{"types":"./dist/runtime/browser-sprite.d.ts","default":"./dist/runtime/browser-sprite.js"}},"gitHead":"3046db902a47d272d62b732b33b6c3831a010c34","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github"],"branches":["main"]},"scripts":{"lint":"eslint src/","test":"tsc && rstest run","build":"tsc","format":"prettier --write .","prepare":"husky","test:ci":"tsc && rstest run --coverage","lint:fix":"eslint src/ --fix","typecheck":"tsc --noEmit","dev:rspack":"pnpm --filter svg-sprite-consumer-demo dev","dev:webpack":"pnpm --filter svg-sprite-webpack-demo dev","format:check":"prettier --check .","prepublishOnly":"pnpm build"},"_npmUser":{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"},"repository":{"url":"git+https://github.com/yichenzhu1337/rspack-plugin-svg-sprite.git","type":"git"},"_npmVersion":"10.9.4","description":"SVG sprite loader and plugin for Rspack — drop-in replacement for svg-sprite-loader with inline and extract mode support","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.29.3","devDependencies":{"husky":"^9.1.7","eslint":"^10.0.1","prettier":"^3.8.1","@eslint/js":"^10.0.1","typescript":"^5.9.3","lint-staged":"^16.2.7","@rspack/core":"^1.7.6","@rstest/core":"^0.8.5","semantic-release":"^25.0.3","typescript-eslint":"^8.56.0","eslint-config-prettier":"^10.1.8","@rstest/coverage-istanbul":"^0.2.1"},"peerDependencies":{"@rspack/core":">=0.5.0","@rsbuild/core":">=1.0.0"},"peerDependenciesMeta":{"@rspack/core":{"optional":true},"@rsbuild/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/rspack-plugin-svg-sprite_1.5.0_1772440120028_0.07003165730883998","host":"s3://npm-registry-packages-npm-production"}},"1.5.1":{"name":"rspack-plugin-svg-sprite","version":"1.5.1","description":"SVG sprite loader and plugin for Rspack — drop-in replacement for svg-sprite-loader with inline and extract mode support","author":{"name":"Yichen Zhu"},"license":"MIT","homepage":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite#readme","repository":{"type":"git","url":"git+https://github.com/yichenzhu1337/rspack-plugin-svg-sprite.git"},"bugs":{"url":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/issues"},"keywords":["rspack","rspack-plugin","rspack-loader","rsbuild","rsbuild-plugin","svg","svg-sprite","svg-sprite-loader","svg-icon","svg-icons","sprite","sprite-sheet","icon","icon-system","loader","plugin","bundler-plugin","webpack","webpack5","extract","inline","symbol","react","vue","migration","drop-in"],"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./plugin":{"types":"./dist/plugin.d.ts","default":"./dist/plugin.js"},"./loader":{"types":"./dist/loader.d.ts","default":"./dist/loader.js"},"./runtime/browser-sprite":{"types":"./dist/runtime/browser-sprite.d.ts","default":"./dist/runtime/browser-sprite.js"},"./runtime/symbol":{"types":"./dist/runtime/symbol.d.ts","default":"./dist/runtime/symbol.js"},"./rsbuild":{"types":"./dist/rsbuild.d.ts","default":"./dist/rsbuild.js"},"./client":{"types":"./client.d.ts"}},"scripts":{"build":"tsc","test":"tsc && rstest run","test:ci":"tsc && rstest run --coverage","typecheck":"tsc --noEmit","lint":"eslint src/","lint:fix":"eslint src/ --fix","format":"prettier --write .","format:check":"prettier --check .","dev:rspack":"pnpm --filter svg-sprite-consumer-demo dev","dev:webpack":"pnpm --filter svg-sprite-webpack-demo dev","prepublishOnly":"pnpm build","prepare":"husky"},"peerDependencies":{"@rspack/core":">=0.5.0","@rsbuild/core":">=1.0.0"},"peerDependenciesMeta":{"@rspack/core":{"optional":true},"@rsbuild/core":{"optional":true}},"devDependencies":{"@eslint/js":"^10.0.1","@rspack/core":"^1.7.6","@rstest/core":"^0.8.5","@rstest/coverage-istanbul":"^0.2.1","eslint":"^10.0.1","eslint-config-prettier":"^10.1.8","husky":"^9.1.7","lint-staged":"^16.2.7","prettier":"^3.8.1","semantic-release":"^25.0.3","typescript":"^5.9.3","typescript-eslint":"^8.56.0"},"packageManager":"pnpm@10.29.3","release":{"branches":["main"],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github"]},"_id":"rspack-plugin-svg-sprite@1.5.1","gitHead":"b957d1ed9a298930fc19668d7bcb7095967cdaf7","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-px0Mesmza28vgSWN95y3UA6w0fHzEthIggHyRI5kSeaeWGNHqC2/Jkd28LCGhOXxaKqTFo8RBI1/cm5zvKxkNA==","shasum":"257521ae23e0ad3fb74b51719e7689a056b6dc6c","tarball":"https://registry.npmjs.org/rspack-plugin-svg-sprite/-/rspack-plugin-svg-sprite-1.5.1.tgz","fileCount":28,"unpackedSize":67137,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFMWHG9MuofVHsWsuG9fFj8XBsr6uMrFuCQleCwrMGkiAiAlolrHYpiBig1UyQClu7mR/D73oIRNbFpHdM3KSC1KRQ=="}]},"_npmUser":{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"},"directories":{},"maintainers":[{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rspack-plugin-svg-sprite_1.5.1_1772494663772_0.6528119695554961"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-22T05:37:03.180Z","modified":"2026-03-02T23:37:44.065Z","1.1.1":"2026-02-22T05:37:03.322Z","1.2.0":"2026-02-22T06:36:09.335Z","1.3.0":"2026-02-22T07:25:53.974Z","1.4.0":"2026-02-28T20:52:10.517Z","1.3.1":"2026-03-02T08:23:03.726Z","1.5.0":"2026-03-02T08:28:40.165Z","1.5.1":"2026-03-02T23:37:43.923Z"},"bugs":{"url":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/issues"},"author":{"name":"Yichen Zhu"},"license":"MIT","homepage":"https://github.com/yichenzhu1337/rspack-plugin-svg-sprite#readme","keywords":["rspack","rspack-plugin","rspack-loader","rsbuild","rsbuild-plugin","svg","svg-sprite","svg-sprite-loader","svg-icon","svg-icons","sprite","sprite-sheet","icon","icon-system","loader","plugin","bundler-plugin","webpack","webpack5","extract","inline","symbol","react","vue","migration","drop-in"],"repository":{"type":"git","url":"git+https://github.com/yichenzhu1337/rspack-plugin-svg-sprite.git"},"description":"SVG sprite loader and plugin for Rspack — drop-in replacement for svg-sprite-loader with inline and extract mode support","maintainers":[{"name":"yichenzhu","email":"yichenzhu1337@gmail.com"}],"readme":"# rspack-plugin-svg-sprite\n\n> SVG sprite loader and plugin for Rspack — a drop-in replacement for [`svg-sprite-loader`](https://github.com/JetBrains/svg-sprite-loader) that works natively with [Rspack](https://rspack.dev/).\n\n[![CI](https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/actions/workflows/ci.yml/badge.svg)](https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/yichenzhu1337/rspack-plugin-svg-sprite/graph/badge.svg)](https://codecov.io/gh/yichenzhu1337/rspack-plugin-svg-sprite)\n[![npm version](https://img.shields.io/npm/v/rspack-plugin-svg-sprite)](https://www.npmjs.com/package/rspack-plugin-svg-sprite)\n[![npm downloads](https://img.shields.io/npm/dm/rspack-plugin-svg-sprite)](https://www.npmjs.com/package/rspack-plugin-svg-sprite)\n[![license](https://img.shields.io/github/license/yichenzhu1337/rspack-plugin-svg-sprite)](https://github.com/yichenzhu1337/rspack-plugin-svg-sprite/blob/main/LICENSE)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/rspack-plugin-svg-sprite)](https://bundlephobia.com/package/rspack-plugin-svg-sprite)\n\n**[Live Demo](https://yichenzhu1337.github.io/rspack-plugin-svg-sprite/)** | **[npm](https://www.npmjs.com/package/rspack-plugin-svg-sprite)** | **[npm trends](https://npmtrends.com/rspack-plugin-svg-sprite-vs-svg-sprite-loader)**\n\n```bash\nnpm install rspack-plugin-svg-sprite -D\n```\n\n---\n\n## Why SVG sprites?\n\nIndividual SVG files mean one HTTP request per icon — 50 icons = 50 requests. Inlining SVGs directly into JSX bloats your bundle with duplicated markup. SVG sprites solve both problems: all icons are combined into a single file (or a single hidden DOM element), and each icon is referenced by `<use href=\"#id\" />` — one request, zero duplication, full CSS styling support, and resolution-independent rendering at any size.\n\n## What is this?\n\n`rspack-plugin-svg-sprite` lets you import `.svg` files in your Rspack (or Webpack 5) project and automatically combine them into an SVG sprite sheet — either inlined in the DOM or extracted as an external `.svg` file.\n\nIt was created because the popular [`svg-sprite-loader`](https://github.com/JetBrains/svg-sprite-loader) depends on internal Webpack APIs (`NormalModule.getCompilationHooks`, `compilation.hooks.additionalAssets`, etc.) that do not exist in Rspack ([rspack#11609](https://github.com/web-infra-dev/rspack/issues/11609)). This package reimplements the same functionality using Rspack-compatible APIs while keeping the exact same exported symbol shape (`id`, `viewBox`, `url`, `content`), so your existing component code works without changes.\n\n## Features\n\n- **Inline mode** (default) — SVG symbols are injected into the DOM at runtime via a hidden `<svg>` element. No plugin needed.\n- **Extract mode** — SVG symbols are emitted as an external `.svg` sprite file at build time. Great for caching and performance.\n- **Drop-in replacement** for `svg-sprite-loader` — same config options, same export shape.\n- **Works with both Rspack and Webpack 5** — auto-detects the bundler at runtime.\n- **TypeScript** — fully typed, ships with `.d.ts` declarations.\n- **Lightweight** — zero runtime dependencies.\n- **Customizable symbol IDs** — use `[name]`, `[folder]`, or a custom function.\n\n## Quick Start\n\n### Install\n\n```bash\nnpm install rspack-plugin-svg-sprite -D\n# or\npnpm add rspack-plugin-svg-sprite -D\n# or\nyarn add rspack-plugin-svg-sprite -D\n```\n\n### Configure (inline mode)\n\n```js\n// rspack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.svg$/,\n        type: 'javascript/auto',\n        loader: 'rspack-plugin-svg-sprite/loader',\n        options: {\n          symbolId: '[name]',\n        },\n      },\n    ],\n  },\n};\n```\n\n> **Important:** The `type: 'javascript/auto'` is required to prevent rspack/webpack's built-in asset module handling from intercepting `.svg` files before the loader runs. Without it, the loader may silently fail to process your SVGs.\n\n### Use in your components\n\n```jsx\nimport logo from './logo.svg';\n\n// logo.id      → \"logo\"\n// logo.viewBox → \"0 0 24 24\"\n// logo.url     → \"#logo\"\n\n<svg viewBox={logo.viewBox}>\n  <use href={logo.url} />\n</svg>;\n```\n\nThat's it. Every imported SVG is automatically registered as a `<symbol>` in a hidden sprite and referenced by `#id`.\n\n### TypeScript\n\nThis package ships with a client type declaration. Add it to your `tsconfig.json` so `import icon from './icon.svg'` is fully typed:\n\n```jsonc\n// tsconfig.json\n{\n  \"compilerOptions\": {\n    \"types\": [\"rspack-plugin-svg-sprite/client\"],\n  },\n}\n```\n\nThis gives you autocompletion for `id`, `viewBox`, `url`, and `content` on every SVG import.\n\n<details>\n<summary>Alternative: manual declaration file</summary>\n\nIf you prefer, create a `svg.d.ts` file instead:\n\n```ts\ndeclare module '*.svg' {\n  const symbol: {\n    id: string;\n    viewBox: string;\n    url: string;\n    content: string;\n  };\n  export default symbol;\n}\n```\n\nMake sure this file is included by your `tsconfig.json` (e.g., in the `include` array or alongside your source files).\n\n</details>\n\n## Extract Mode\n\nTo emit SVGs as an external `.svg` sprite file instead of inlining them, enable extract mode and add the plugin:\n\n```js\n// rspack.config.js\nconst { SvgSpritePlugin } = require('rspack-plugin-svg-sprite');\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.svg$/,\n        type: 'javascript/auto',\n        loader: 'rspack-plugin-svg-sprite/loader',\n        options: {\n          extract: true,\n          symbolId: 'icon-[name]',\n          spriteFilename: 'sprites/icons.svg',\n          publicPath: '/assets/',\n        },\n      },\n    ],\n  },\n  plugins: [\n    new SvgSpritePlugin({\n      plainSprite: true,\n      spriteAttrs: { id: 'svg-sprite' },\n    }),\n  ],\n};\n```\n\nIn extract mode, the exported `url` points to the external file:\n\n```jsx\nimport icon from './icon.svg';\n\n// icon.url → \"/assets/sprites/icons.svg#icon-icon\"\n\n<svg viewBox={icon.viewBox}>\n  <use href={icon.url} />\n</svg>;\n```\n\n## API Reference\n\n### Loader Options\n\n| Option           | Type                 | Default        | Description                                                                                                               |\n| ---------------- | -------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| `symbolId`       | `string \\| function` | `'[name]'`     | Pattern for generating symbol IDs. Supports `[name]`, `[folder]`, `[ext]` placeholders, or a function `(filePath) => id`. |\n| `esModule`       | `boolean`            | `true`         | Use ES module export (`export default`) vs CommonJS (`module.exports`).                                                   |\n| `extract`        | `boolean`            | `false`        | Enable extract mode to emit an external sprite file instead of inlining.                                                  |\n| `spriteFilename` | `string`             | `'sprite.svg'` | Output filename for the extracted sprite (extract mode only).                                                             |\n| `publicPath`     | `string`             | `''`           | Public URL prefix for the sprite file (extract mode only). Auto-detected from `output.publicPath` if not set.             |\n| `include`        | `string[]`           | —              | Glob patterns or directories to include (only process matching SVGs).                                                     |\n| `exclude`        | `string[]`           | —              | Glob patterns or directories to exclude from processing.                                                                  |\n\n### Plugin Options (Extract Mode)\n\n| Option        | Type      | Default | Description                                                             |\n| ------------- | --------- | ------- | ----------------------------------------------------------------------- |\n| `plainSprite` | `boolean` | `false` | Generate a plain sprite without preview styles and `<use>` elements.    |\n| `spriteAttrs` | `object`  | `{}`    | Additional attributes to add to the root `<svg>` element of the sprite. |\n\n### Exported Symbol Shape\n\nEvery `import icon from './icon.svg'` returns an object with:\n\n| Property  | Type     | Example                                            | Description                                        |\n| --------- | -------- | -------------------------------------------------- | -------------------------------------------------- |\n| `id`      | `string` | `\"icon-home\"`                                      | The symbol ID inside the sprite.                   |\n| `viewBox` | `string` | `\"0 0 24 24\"`                                      | The original SVG `viewBox` attribute.              |\n| `url`     | `string` | `\"#icon-home\"` or `\"/sprites/icons.svg#icon-home\"` | Fragment reference (inline) or full URL (extract). |\n| `content` | `string` | `\"<symbol id=\\\"icon-home\\\" ...>...</symbol>\"`      | Raw `<symbol>` markup.                             |\n\nThis matches `svg-sprite-loader`'s export shape exactly, so migrating requires no component changes.\n\n## Rsbuild Integration\n\nIf you're using [Rsbuild](https://rsbuild.dev/), use the built-in Rsbuild plugin for one-line setup:\n\n```js\n// rsbuild.config.js\nconst { pluginSvgSprite } = require('rspack-plugin-svg-sprite/rsbuild');\n\nmodule.exports = {\n  plugins: [\n    pluginSvgSprite({\n      symbolId: 'icon-[name]',\n      extract: true,\n      spriteFilename: 'sprites/icons.svg',\n    }),\n  ],\n};\n```\n\nThe Rsbuild plugin handles the loader rule, `type: 'javascript/auto'`, and the `SvgSpritePlugin` automatically.\n\n## Framework Recipes\n\n### Next.js (with next-rspack)\n\n```js\n// next.config.js\nconst { SvgSpritePlugin } = require('rspack-plugin-svg-sprite');\n\nmodule.exports = {\n  webpack(config) {\n    // Remove Next.js default SVG handling\n    const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.('.svg'));\n    if (fileLoaderRule) fileLoaderRule.exclude = /\\.svg$/;\n\n    config.module.rules.push({\n      test: /\\.svg$/,\n      type: 'javascript/auto',\n      loader: 'rspack-plugin-svg-sprite/loader',\n      options: { symbolId: 'icon-[name]', extract: true },\n    });\n\n    config.plugins.push(new SvgSpritePlugin({ plainSprite: true }));\n    return config;\n  },\n};\n```\n\n### Vue + Rspack\n\n```js\n// rspack.config.js\nconst { SvgSpritePlugin } = require('rspack-plugin-svg-sprite');\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.svg$/,\n        type: 'javascript/auto',\n        loader: 'rspack-plugin-svg-sprite/loader',\n        options: { symbolId: '[name]' },\n      },\n    ],\n  },\n};\n```\n\n```vue\n<template>\n  <svg :viewBox=\"icon.viewBox\">\n    <use :href=\"icon.url\" />\n  </svg>\n</template>\n\n<script setup>\nimport icon from './icon.svg';\n</script>\n```\n\n## Migrating from svg-sprite-loader\n\n```diff\n// rspack.config.js\n-const SpriteLoaderPlugin = require('svg-sprite-loader/plugin');\n+const { SvgSpritePlugin } = require('rspack-plugin-svg-sprite');\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.svg$/,\n+       type: 'javascript/auto',\n-       loader: 'svg-sprite-loader',\n+       loader: 'rspack-plugin-svg-sprite/loader',\n        options: {\n          symbolId: 'icon-[name]',\n+         // Add extract: true if you were using extract mode\n        },\n      },\n    ],\n  },\n  plugins: [\n-   new SpriteLoaderPlugin(),\n+   new SvgSpritePlugin(), // Only needed for extract mode\n  ],\n};\n```\n\nYour component code stays the same — the exported symbol object has the identical shape (`id`, `viewBox`, `url`, `content`).\n\n## Migrating from `asset/resource`\n\nIf you're currently using rspack/webpack's built-in `asset/resource` type to handle SVGs (common in webpack 5+ / rspack projects), you can replace it with this plugin to get proper SVG sprite support:\n\n```diff\n// rspack.config.js\n+const { SvgSpritePlugin } = require('rspack-plugin-svg-sprite');\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.svg$/,\n-       type: 'asset/resource',\n-       generator: {\n-         filename: 'images/icons/[name].[contenthash][ext]',\n-       },\n+       type: 'javascript/auto',\n+       loader: 'rspack-plugin-svg-sprite/loader',\n+       options: {\n+         extract: true,\n+         symbolId: '[name]',\n+         spriteFilename: 'sprite.svg',\n+       },\n      },\n    ],\n  },\n+ plugins: [\n+   new SvgSpritePlugin({ plainSprite: true }),\n+ ],\n};\n```\n\n**Key points:**\n\n- `type: 'javascript/auto'` is **required** — it overrides the previous `asset/resource` handling and lets the loader process SVGs as JavaScript modules.\n- The sprite file is emitted to your output directory (e.g., `dist/sprite.svg`).\n- If you were using a separate CLI tool (like `svg-sprite`) to generate sprites as a post-build step, you can remove that — the plugin handles everything inside the rspack build pipeline.\n\n## How It Works\n\n### Inline Mode\n\n1. The loader parses each `.svg` file and wraps its content in an SVG `<symbol>` element.\n2. It generates a JS module that imports a browser-side sprite manager.\n3. At runtime, the sprite manager creates a hidden `<svg>` element in `document.body` and appends all symbols.\n4. You reference symbols via `<use href=\"#symbolId\" />`.\n\n### Extract Mode\n\n1. The loader wraps each SVG as a `<symbol>` and registers it with the plugin via the compilation object.\n2. During Rspack's `processAssets` stage, the plugin collects all registered symbols and emits a combined `.svg` sprite file.\n3. The exported JS module contains the external file URL (e.g., `/sprites/icons.svg#symbolId`).\n\n## Alternatives & Comparison\n\nLooking for the right SVG solution for Rspack? Here's how the options compare:\n\n| Feature               | rspack-plugin-svg-sprite | svg-sprite-loader           | @svgr/webpack    | @rsbuild/plugin-svgr | vite-plugin-svg-icons |\n| --------------------- | ------------------------ | --------------------------- | ---------------- | -------------------- | --------------------- |\n| **Rspack support**    | Native                   | No (uses Webpack internals) | Via config       | Rsbuild only         | No (Vite only)        |\n| **Approach**          | SVG sprites (`<use>`)    | SVG sprites (`<use>`)       | React components | React components     | SVG sprites           |\n| **Inline mode**       | Yes                      | Yes                         | N/A              | N/A                  | Yes                   |\n| **Extract mode**      | Yes                      | Yes                         | N/A              | N/A                  | No                    |\n| **Webpack 5 support** | Yes                      | Yes                         | Yes              | No                   | No                    |\n| **Runtime deps**      | Zero                     | 1                           | Several          | Several              | Several               |\n| **Maintained**        | Yes                      | No (archived)               | Yes              | Yes                  | Yes                   |\n| **Drop-in migration** | —                        | Yes (same API)              | Different API    | Different API        | Different API         |\n\n**When to use SVG sprites** (this plugin): You want icons combined into a single file with `<use href=\"#id\">` references — optimal for large icon sets, full CSS styling control, and caching. Best when migrating from `svg-sprite-loader`.\n\n**When to use SVGR**: You want each SVG as a React component with props for color, size, etc. Better for SVGs that need dynamic manipulation via React props rather than CSS.\n\n## Compatibility\n\n| Bundler                            | Version  | Status                                   |\n| ---------------------------------- | -------- | ---------------------------------------- |\n| [Rspack](https://rspack.dev/)      | >= 0.5.0 | Fully supported (primary target)         |\n| [Webpack](https://webpack.js.org/) | 5.x      | Supported via `webpack-sources` fallback |\n\n## Examples\n\nThe repository includes three runnable demo apps:\n\n| Example                                              | Bundler   | Plugin                     | Port | Description                                                       |\n| ---------------------------------------------------- | --------- | -------------------------- | ---- | ----------------------------------------------------------------- |\n| [`react-rspack`](examples/react-rspack/)             | Rspack    | `rspack-plugin-svg-sprite` | 3000 | Extract mode with icon gallery, sidebar, and buttons              |\n| [`react-webpack`](examples/react-webpack/)           | Webpack 5 | `svg-sprite-loader`        | 4000 | Same UI using the original loader (for comparison)                |\n| [`vue-rspack-extract`](examples/vue-rspack-extract/) | Rspack    | `rspack-plugin-svg-sprite` | 3002 | Vue 3 + extract mode with `plainSprite` and external `<use href>` |\n\n**[Live demo (Rspack)](https://yichenzhu1337.github.io/rspack-plugin-svg-sprite/)** — see the plugin in action.\n\nRun locally from the project root:\n\n```bash\npnpm install\npnpm dev:rspack   # http://localhost:3000\npnpm dev:webpack  # http://localhost:4000\n```\n\n## Troubleshooting\n\n### Sprite file not emitted / icons not rendering\n\n**Symptom:** The build succeeds with no errors, but `sprite.svg` is not in the output directory and SVG icons don't render.\n\n**Cause:** rspack/webpack's built-in asset module handling is intercepting `.svg` files before the loader runs.\n\n**Fix:** Add `type: 'javascript/auto'` to your SVG rule:\n\n```js\n{\n  test: /\\.svg$/,\n  type: 'javascript/auto', // ← Add this\n  loader: 'rspack-plugin-svg-sprite/loader',\n  options: { extract: true, symbolId: '[name]' },\n}\n```\n\n### Warning: \"SvgSpritePlugin is registered but no SVG symbols were collected\"\n\nThis means the plugin is in your `plugins` array but no SVGs went through the loader. Common causes:\n\n1. **Missing `type: 'javascript/auto'`** on the loader rule (see above).\n2. **`include`/`exclude` filters** on the rule don't match your SVG file paths.\n3. **No SVG imports** in your code — at least one `.svg` file must be imported for the loader to process it.\n\n### Warning: \"Extract mode is enabled but SvgSpritePlugin was not found\"\n\nThis means the loader is running in extract mode (`extract: true`) but `SvgSpritePlugin` isn't in the `plugins` array. Add it:\n\n```js\nconst { SvgSpritePlugin } = require('rspack-plugin-svg-sprite');\n\nmodule.exports = {\n  plugins: [new SvgSpritePlugin()],\n};\n```\n\n## Contributing\n\nContributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, project structure, and guidelines.\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}