Svg Module screenshot

Svg Module

Author Avatar Theme by Nuxt community
Updated: 4 Sep 2023
343 Stars

Super simple svg loading module for Nuxt.js

Categories

Overview

The “@nuxtjs/svg” package is a super simple SVG loading module for Nuxt.js. It allows you to import SVG files in various ways depending on the resource query provided. This package provides flexibility and ease of use for loading SVGs into Nuxt.js pages.

Features

  • file.svg - normal import using file-loader
  • file.svg?data - base64 data url import using url-loader
  • file.svg?inline - inline import using vue-svg-loader
  • file.svg?raw - raw HTML import using raw-loader
  • file.svg?sprite - SVG sprite using svg-sprite-loader

Installation

To install the “@nuxtjs/svg” package, follow these steps:

  1. Install the package using npm:
npm install @nuxtjs/svg

Summary

The “@nuxtjs/svg” package is a useful tool for loading SVGs into Nuxt.js pages. It provides multiple ways to import SVG files, allowing for flexibility and ease of use. The installation process is straightforward, making it easy to integrate into your Nuxt.js project.