Icons Legacy Solution
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
- 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
- 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.