webpack-svgstore weekly downloads statistics
By davidbepa · npm · Webpack plugins
Svgstore plugin for Webpack 5
webpack-svgstore has 147 recorded weekly downloads on npm, a decrease of 34.1% over the past 30 days, ranking #1700 of 2,322 tracked listings.
About webpack-svgstore
webpack-svgstore
<br/> <div align="center"> <a href="http://www.w3.org/Graphics/SVG/"> <img width="150" height="150" src="./example/static/svg/svg-logo.svg"> </a> <a href="https://webpack.js.org/"> <img width="150" height="150" src="https://webpack.js.org/assets/icon-square-big.svg"> </a> </div> <br/>Combine svg files into one with <symbol> elements. Read more about this in CSS Tricks article. This plugin was built for Webpack 5. It takes some ideas from webpack-svgstore-plugin and gulp-svgstore.
Install
Using npm:
npm i webpack-svgstore
Using yarn:
yarn add webpack-svgstore
Usage
1) Require the plugin in your webpack.config.js file
//webpack.config.js
const SvgStore = require("webpack-svgstore");
module.exports = {
plugins: [
// create svgStore instance object
new SvgStore({
path: path.resolve(__dirname, "assets/svg/**/*.svg"),
fileName: "svg-sprites.svg",
prefix: "icon-",
}),
],
};
2) Add the sprites loader in your code
import svgxhr from "webpack-svgstore/dist/helpers/svgxhr";
svgxhr("svg-sprites.svg");
3) HTML code for using your icons
HTML:
<svg>
<use xlink:href="#icon-name"></use>
</svg>
JSX:
<svg>
<use xlinkHref="#icon-name" />
</svg>
Plugin Options
| Name | Type | Default | Description |
|---|---|---|---|
path | {String} | /**/*.svg | This option determines the path to the svg files that are going to be included in the sprites file. |
fileName | {String} | svg-sprites.svg | This option determines the name of the resulting sprites file. |
inlineSvg | {Boolean} | false | This option determines if the output should only contain the <svg> element without <?xml ?> and DOCTYPE to use inline. |
removeViewBox | {Boolean} | false | Allows removing the viewBox attribute from each element. |
prefix | {String} | icon- | This option determines the prefix of each symbol's id . |
License
NPM package available here: webpack-svgstore
MIT © David Bergmann
Description from the npm listing.
- webpack
- webpack-plugin
- svg
- svgo
- svgstore
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (544)Similar npm Webpack plugins plugins
All 20 webpack-svgstore alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/webpack-svgstore. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.