1.0.6 • Published 6 years ago

vue-svg-symbol-loader v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

vue-svg-symbol-loader

SVG symbol webpack loader for Vue.

Installation

npm i -D vue-svg-symbol-loader

Configuration

// webpack.config.js
{
  test: /\.svg$/,
  loader: "vue-svg-symbol-loader"
}

Example

<template>
  <nav>
    <ul>
      <li><UserIcon/> User</li>
      <li><ExitIcon/> Exit</li>
    </ul>
  </nav>
</template>

<script>
import UserIcon from "./assets/sprites.svg?user"; // "user" is the id inside the svg sprite file.
import ExitIcon from "./assets/sprites.svg?exit"; // "exit" is the id inside the svg sprite file.

export default {
  name: "ExampleComponent",
  components: {
    UserIcon,
    ExitIcon
  }
};

</script>
1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago