kiwilan / nuxt-svg-transformer

Nuxt 3 module. Transform SVG to inject dynamically into Vue component, type included. Powered by unplugin.
https://github.com/kiwilan/unplugin-svg-transformer
MIT License
27 stars 6 forks source link
module nuxt nuxt3 svg svg-icons typescript vue vuejs

Nuxt SVG transformer

[!IMPORTANT]

This repository is now deprecated in favor of unplugin-svg-transformer, the successor of nuxt-svg-transformer. Please consider to use unplugin-svg-transformer instead.

A Nuxt 3 module to manage SVG as icons, transform SVG to inject dynamically into Vue component, type included.

Features

Migration to unplugin-svg-transformer

Breaking changes:

Usage

This documentation offer to install unplugin-svg-transformer instead nuxt-svg-transformer (deprecated), you can use the same options.

npm i unplugin-svg-transformer --save-dev
# or
yarn add unplugin-svg-transformer --dev
# or
pnpm add unplugin-svg-transformer -D

Add it to nuxt.config.ts:

export default defineNuxtConfig({
  modules: [
    "unplugin-svg-transformer/nuxt", // https://github.com/kiwilan/unplugin-svg-transformer
  ],
  svgTransformer: {
    // Options
  },
});

See documentation.

License

MIT - Made with πŸ’š