Socket
Socket
Sign inDemoInstall

@4tw/vue-cli-plugin-svg-icon

Package Overview
Dependencies
424
Maintainers
7
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @4tw/vue-cli-plugin-svg-icon

Adds webpack rules to generate optimized svg sprites.


Version published
Weekly downloads
59
increased by96.67%
Maintainers
7
Install size
15.5 MB
Created
Weekly downloads
 

Readme

Source

vue-cli-plugin-svg-icon

Adds webpack rules to generate optimized svg sprites.

Setup

yarn add --dev @4tw/vue-cli-plugin-svg-icon

Usage

Provide a svgDir option under pluginOptions in your vue.config.js config.

module.exports = {
  pluginOptions: {
    svgDir: path.resolve(__dirname, 'src/assets/svg'),
  },
}

Usage

All svg files under the svgDir are processes and provided as an import. The imports are aliased under svg.

import Icon from 'svg/your_icon.svg'

The imported module provides a symbol from the svg-sprite-loader

Keywords

FAQs

Last updated on 07 Jun 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc