@teamwork/vue-svg-loader

1.0.2 • Public • Published

vue-svg-loader

A webpack loader that allows to use SVG files as Vue Components.

Installation

npm install --save-dev vue-svg-loader
yarn add --dev vue-svg-loader

Configuration

{
  test: /\.svg$/,
  loader: 'vue-svg-loader', // `vue-svg` for webpack 1.x
}

Example code

<template>
  <nav id="menu">
    <a href="...">
      <SomeIcon class="icon" />
      Some page
    </a>
  </nav>
</template>

<script>
import SomeIcon from './assets/some-icon.svg';

export default {
  name: 'menu',
  components: {
    SomeIcon,
  },
};
</script>

The idea behind this was inspired by react-svg-loader.

Package Sidebar

Install

npm i @teamwork/vue-svg-loader

Weekly Downloads

5

Version

1.0.2

License

MIT

Last publish

Collaborators

  • irltopper
  • lisa-kavs
  • loaymoolb
  • furqanali
  • mari_ka
  • mattgeek
  • nern-tw
  • joseluis-tw
  • ivnosing
  • karenhodgins
  • ryanoc8
  • laurenoc125
  • karolina.truszkowska
  • alifletch
  • imrafalman
  • encarnaamoros
  • marcos.gutierrez
  • tonisanta
  • gmc123
  • rodynnz
  • tanyairwinblack
  • pmgriffin
  • victoriasloan
  • a1d0
  • alvarotw
  • seanogdev
  • conor.quin
  • manucuestatw
  • chrisrollins65
  • andrssl
  • kclaur
  • yonson2
  • xlerida
  • pktw
  • decob
  • pinkkis
  • ilserodriguez
  • k823
  • crssn
  • chrisjtwomey
  • simonbb
  • vg500
  • ma-jerez
  • ivayloovcharov
  • ismaelpenalver
  • kadenn
  • nathanmcclelland
  • fatihunlu
  • lmcaree
  • mjteamwork
  • matteobandiera
  • stdiopt
  • roryok
  • duncan1a
  • garycremen
  • dommurphytw
  • bmckay397
  • sineadcullinane
  • miccc
  • shanepm
  • sheyla.marhuenda
  • techfort
  • rafaeljusto
  • 1001hz
  • 4ver
  • emmetcampion
  • bakaat
  • aetheon
  • teamwork-dev
  • cianwoods
  • kersh
  • jamesdraper5
  • aodhom
  • ripexz
  • morethanaprogrammer
  • jatochnietdan
  • samternent
  • pshad0w
  • dmackey
  • yawlhead91
  • gkubisa
  • jessicaaferraz
  • arielpiecha-teamwork
  • cesartw
  • jamesmccullough
  • garymcbay
  • ekm1908
  • adamcarroll-teamwork
  • hmarron
  • bradderz
  • patrickaodh
  • vercadium
  • steve.walsh
  • victoriasloan1995
  • guillermofgorostidi
  • lucasleandro1204
  • atilkan
  • ktopouzi
  • aidancasey
  • valerio-farriciello
  • netoramalhotw
  • ap7t
  • luketynan
  • marciliotw
  • alekaei
  • twsanjay
  • chrismccormack
  • jaspiertw