Skip to content

wenqian0812/rsbuild-plugin-svg-sprite-loader

Repository files navigation

rsbuild-svg-sprite-loader

rsbuild-svg-sprite-loader is a Rsbuild plugin to do something.

npm version license

Usage

Install:

npm add rsbuild-svg-sprite-loader -D

Add plugin to your rsbuild.config.ts:

// rsbuild.config.ts
import { pluginSvgSpriteLoader } from "rsbuild-plugin-svg-sprite-loader";

export default {
  plugins: [
    pluginSvgSpriteLoader({
      path: join(__dirname, 'src/icons'),
      symbolId: 'icon-[name]',
    }),
  ],
};

Options

SvgSpriteLoaderOptions

Some description.

  • path: string
  • symbolId: string
  • Example:
pluginSvgSpriteLoader({
  path: join(__dirname, 'src/icons'),
  symbolId: 'icon-[name]',
})

License

MIT.

About

rsbuild svg loader

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published