0.4.0 • Published 1 year ago

vite-plugin-vue2-svg v0.4.0

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

vite-plugin-vue2-svg

load SVG files as Vue components, for Vue2.x only.

NPM

Install

yarn add vite-plugin-vue2-svg
# or
npm install vite-plugin-vue2-svg

Usage

// vite.config.ts
import { defineConfig } from "vite";
import { createVuePlugin } from "vite-plugin-vue2"; // vue2 plugin
import { createSvgPlugin } from "vite-plugin-vue2-svg";

export default defineConfig({
  plugins: [createVuePlugin(), createSvgPlugin()],
});
<!-- App.vue -->
<template>
  <Icon />
</template>
<script>
import Icon from "./icon.svg";

export default {
  components: {
    Icon,
  },
};
</script>

Options

createSvgPlugin({
  svgoConfig: SVGO.Options, // check https://github.com/svg/svgo
});

License

MIT

0.4.0

1 year ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.2

2 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago