2.1.2 • Published 1 year ago

nuxt-symbol-icons v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

nuxt-symbol-icons

A nuxt(2) module for using svg sprite icon.

Features

Installation

# yarn
$ yarn add --dev nuxt-symbol-icons

# npm 
$ npm i nuxt-symbol-icons -D

# pnpm
$ pnpm add --dev nuxt-symbol-icons

Usage

  1. Configure your nuxt.config.js
// nuxt.config.js

module.exports = {
  // ...
  buildModules: ['nuxt-symbol-icons'],
  nuxtSymbolIcons: {
    // ...
  }
}
  1. Put your SVG icon into ~/assets/icons/svg/ folder.

  2. then, you can use <svg-icon name="icon-name" /> in projects. The <svg-icon /> component powered by vue-symbol-icon

Options

KeyTypeDefault valueDescription
enablebooleantrueWhether to enable nuxt-symbol-icons
svgoConfig Added in v2.0.0boolean/SvgoConfig{}Define configuration of SVGO, if set to false, will disable SVGO.
enableSvgoPresetDefaultConfig Added in v2.0.0booleantrueWhether to add preset-default config for SVGO
svgSymbolIdPrefixstringicon-Define the SVG symbol id prefix.
globalComponentNamestringSvgIconDefine the global component name of vue-symbol-icon.
svgSpriteLoaderIncludeDirstringassets/icons/svgDefine the include folder for svg-sprite-loader.
requireContextSvgDirstring~/assets/icons/svgDefine the SVG icons folder for Batch imports via require.context.
extraSvgSpriteLoaderOptionsRecord<string, any>{}Configure extra options for svg-sprite-loader.
extraPreLoadersRuleSetUseItem[][]Use some other loaders before svg-sprite-loader processes SVG.

CHANGE LOG

see CHANGE LOG

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.8.0

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.6.4

1 year ago

1.6.3

1 year ago

1.6.2

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.6

1 year ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago