Skip to content

Icons Legacy Solution

NPM Version

Legacy solution for icons, primarily provided for Vue 2 usage. Uses the SvgIcon component. SVG files in the src/icons directory use this solution by default. This solution relies on svg-sprite-loader implementation, so the bundler does not support Vite.

Setup

  1. Install the plugin
bash
$ npm add @winner-fed/plugin-icons-legacy -D
bash
$ yarn add @winner-fed/plugin-icons-legacy -D
bash
$ pnpm add @winner-fed/plugin-icons-legacy -D
bash
$ bun add @winner-fed/plugin-icons-legacy -D
  1. Enable the plugin in the .winrc configuration file
ts
import { defineConfig } from 'win';

export default defineConfig({
  plugins: [require.resolve('@winner-fed/plugin-icons-legacy')],
  iconsLegacy: {
    include: []
  }
});

Configuration

include

  • Type: Array<string>
  • Default: []

Used for additional SVG files that need to be parsed using this solution. Note that absolute paths must be used.

Released under the MIT License.