Options
Loader options
Set on the rule that uses rspack-plugin-svg-sprite/loader.
include and exclude are not loader options. To limit which SVGs become sprite symbols, use the include / exclude conditions of the bundler rule itself, or the options of the same name on the Rsbuild plugin (pluginSvgSprite({ include: /icons/ })).
Plugin options
Passed to new SvgSpritePlugin({ ... }). The plugin is only needed in extract mode.
Rsbuild plugin options
pluginSvgSprite(options) from rspack-plugin-svg-sprite/rsbuild accepts symbolId, extract, esModule, spriteFilename, publicPath, content, plainSprite, spriteAttrs, include and exclude (a RegExp or a string). The defaults are the ones above.
Exported symbol shape
Every import icon from './icon.svg' returns { id, viewBox, url, content }. See Getting started for the table. This matches svg-sprite-loader's export shape, so migrating needs no component changes.