/vue-cli-plugin-svg-loader

⚒️ Vue CLI plugin that adds vue-svg-loader to enable usage of SVG files as Vue components

Primary LanguageJavaScript

vue-cli-plugin-svg-loader

Vue SVG Loader Plugin for vue-cli@3.0

Install

If you haven't yet installed vue-cli 3, first follow the install instructions here: https://github.com/vuejs/vue-cli

Generate a project

vue create my-app

Install the plugin

cd my-app
vue add svg-loader

Configuration can be done in vue.config.js.

module.exports = {
  pluginOptions: {
    svgLoader: {
      svgo: { plugins: [{ removeViewBox: false }, { removeXMLNS: true }] }
    }
  }
};