Skip to content
PluginStats

svg-chunk-webpack-plugin weekly downloads statistics

By yoriiis · npm · Webpack plugins

Generate SVG sprites according to entrypoint dependencies. Each page only imports its own svgs, wrapped as a sprite and optimized by svgo

View on npm Fresh · Oct 17, 2026

svg-chunk-webpack-plugin has 807 recorded weekly downloads on npm, a decrease of 40.8% over the past 30 days.

It ranks #1435 of 2,256 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -13.8%.

PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.

Weekly downloads
807
Official API · Oct 17, 2026
7-day growth
-49.7%
-796 weekly downloads
30-day growth
-40.8%
-557 weekly downloads
90-day growth
-13.8%
-129 weekly downloads
Rank
#1435
Among tracked npm listings

About svg-chunk-webpack-plugin

SvgChunkWebpackPlugin

The svg-chunk-webpack-plugin creates optimized SVG sprites, according to Webpack's entrypoints. Each sprite contains only the SVG dependencies listed on its entrypoints to improved code splitting, even on SVG files.

The plugin includes the popular SVGO package to generates clean and optimized SVG sprites.

Code splitting is the key to deliver files without any content that is unused by the pages. It already exists for CSS, Javascript and now for SVG files with this plugin.

When to use this plugin

On multiple page application, each pages must includes only its necessary dependencies. In other words, it must include only the SVG files imported by its entrypoint and all its dependencies.

With reusable components, SVGs are often duplicated on all the project. Now, you can create a global SVG library and every Javascript files can easily import any SVG from this library. Entrypoint dependencies are automatically updated, thanks to the Webpack compilation.

When you work with SVGs exported by design softwares, like Sketch or Illustrator, their source code is never optimized and often contains comments, CSS classes which can create conflicts between them. The plugin automatically cleans all SVGs before creating the sprite.

Zero config

The plugin works without configuration with already the optimized settings. For advanced usage, see the section using configuration.

Installation

The plugin is available as a package with the name of svg-chunk-webpack-plugin on npm and Github.

[!WARNING] Plugin svg-chunk-webpack-plugin@5 is ESM only.\n

[!NOTE] Minimum supported Node.js version is 16.20.0 and Webpack >=5.10.3.

[!NOTE] The plugin is compatible with html-webpack-plugin (optional dependency). Use the injectSpritesInTemplates option to automatically inject sprites into your HTML templates.

Example

The project includes a minimalist example in the ./example directory. Run the npm run build:example command to execute the Webpack example and see the plugin's implementation in action.

Basic usage

The plugin will generate one SVG sprite for each entrypoints. Sprites are built in the output path directory with all the other assets. Each sprite filename is composed with its entrypoint name (in the example below, that would be home.svg).

First, let's add the loader and the plugin to the Webpack configuration.

[!WARNING] The loader and the plugin need to works together.

webpack.config.js

[!NOTE] For more flexibility and better performance, inline SVG files are better. Fewer HTTP requests, CSS properties to change the style, no flickering during the page load.

Then, include the sprite in the wanted pages (_we use Twig in the following example_).

home.html.twig

Finally, use the SVG with the tag, like the following example. Replace by the SVG name (without the extension).

home.html.twig

Using a configuration

The loader and the plugin accepts configuration to override the default behavior.

Loader

The loader configuration allow to personalize the SVGO configuration. SVGO optimization is executed during the loader process to optimize build performance.

configFile

Type:

Default: path.resolve(opts.root, 'svgo.config.js')

Tells the loader whether to load the custom SVGO configuration. Custom configuration can be disabled with configFile: false.

webpack.config.js

SVGO custom configuration

SVGO have a default preset to optimize SVG files. See how to configure svgo for details.

svgo.config.js

Plugin

The plugin configuration allow to personalize sprite settings.

filename

Type:

Default: '[name].svg'

Tells the plugin whether to personalize the default sprite filename. The placeholder [name] is automatically replaced by entrypoints names.

webpack.config.js

[!NOTE] The filename parameter is compatible with Webpack caching placeholders, see the section caching.

svgstoreConfig

Type:

Default: { cleanDefs: false, cleanSymbols: false, inline: true }

SVG sprites are built using the svgstore package. Update the parameters according to your needs from the options list available on the svgstore documentation.

webpack.config.js

[!NOTE] To avoid LinearGradient conflicts, avoid the display: none property which breaks SVG definitions.

generateSpritesManifest

Type:

Default: false

Tells the plugin whether to generate the sprites-manifest.json. The JSON file contains the list of all SVG included by entrypoints.

webpack.config.js

generateSpritesPreview

Type:

Default: false

Tells the plugin whether to generate the sprites-preview.html. The HTML preview contains a display list of all SVG included by entrypoints with the SVG overviews and the names. See the sprites preview of the example.

webpack.config.js

injectSpritesInTemplates

Type:

Default: false

Enables the plugin to inject sprites into HTML files generated by html-webpack-plugin. The sprites will be injected at the beginning of the content .

[!NOTE] The sprites associated with the entrypoints listed in the chunks parameter of HtmlWebpackPlugin will be automatically included in the corresponding HTML files.

webpack.config.js

Caching

With webpack caching, several placeholders are available depending on your needs. With SVG inlined in the page, this option is not useful.

[!NOTE] The [contenthash] placeholder is the best option because it depends on the sprite content. Cache placeholders are expensive in build performance, use it only in production mode.

[contenthash]

The [contenthash] placeholder will add a unique hash based on the content of the sprite. When the sprite's content changes, the hash will change as well.

webpack.config.js

[fullhash]

The [fullhash] placeholder will add a unique hash generated for every build. When the compilation build is updated, the hash will change as well.

webpack.config.js

License

svg-chunk-webpack-plugin is licensed under the MIT License.

Created with ♥ by @yoriiis.

Description from the npm listing.

  • svg
  • svg-sprite
  • svgo
  • svgstore
  • webpack
  • webpack-plugin
  • webpack-loader
  • chunk
  • optimization
  • minification
  • javascript

Where svg-chunk-webpack-plugin sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,256 listings · 113 pages · page 72, #16 (overall #1436)
All npm: every listing in weekly downloads order
PNG SVG
Webpack plugins247 listings · 13 pages · page 3, #17 (overall #57)
Webpack plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

svg-chunk-webpack-plugin weekly downloads on npm, last 90 days: 807 weekly downloads as of Oct 17, 2026, -13.8% over 90 days.svg-chunk-webpack-pluginWeekly downloads on npm · Last 90 days807downloads / week-13.8% over 90 days6008001K1.2K1.4K1.6K1.8K2KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
svg-chunk-webpack-plugin weekly downloads on npm, last 90 days: 807 weekly downloads as of Oct 17, 2026, -13.8% over 90 days.
PNG SVG

7/30/90-day growth

svg-chunk-webpack-plugin weekly downloads growth on npm: -49.7% over 7 days, -40.8% over 30 days, -13.8% over 90 days.svg-chunk-webpack-pluginWeekly downloads growth on npm807downloads / week now7-day growth-796 weekly downloads-49.7%30-day growth-557 weekly downloads-40.8%90-day growth-129 weekly downloads-13.8%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
svg-chunk-webpack-plugin weekly downloads growth on npm: -49.7% over 7 days, -40.8% over 30 days, -13.8% over 90 days.
PNG SVG

Ranking history

svg-chunk-webpack-plugin npm ranking history: currently #1435 (by weekly downloads).svg-chunk-webpack-pluginnpm ranking · by weekly downloads · Last 90 days#1435current rank#400#600#800#1000#1200#1400#1600Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 17, 2026 – Oct 19, 2026 · 3 observations · Updated Oct 17, 2026pluginstats.com
svg-chunk-webpack-plugin npm ranking history: currently #1435 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (543)
Recent weekly downloads observations for svg-chunk-webpack-plugin
Date (UTC)Weekly downloadsChange vs. previous
807-50
857-73
930-403
1,333-424
1,7570
1,757+156
1,601-2
1,603-43
1,646+53
1,593+64
1,529+102
1,427-239
1,666+36
1,630—

Similar npm Webpack plugins plugins

Data 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/svg-chunk-webpack-plugin. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.