Sleep

Nuxt Svgo Loader - Vue.js Feed #.\n\nNuxt component to load SVG data as Vue parts, utilizing SVGO for optimization.\nComponents.\nTons SVG submits as Vue elements.\nImprove SVGs using SVGO.\nSmooth integration along with Nuxt DevTools.\nInstallation.\nSet up as well as include nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package manager.pnpm incorporate -D nuxt-svgo-loader.npm put up -D nuxt-svgo-loader.anecdote incorporate -D nuxt-svgo-loader.export default defineNuxtConfig( elements: [' nuxt-svgo-loader'],.svgoLoader: // Possibilities below will certainly be passed to 'vite-svg-loader'. ).[KEEP IN MIND] Given that nuxt-svgo-loader is actually a Nuxt element based on vite-svg-loader, the setup for svgoLoader continues to be the same to that of vite-svg-loader. You can easily pertain to the paperwork of vite-svg-loader for the on call options listed here.Usage.Part.SVGs can be explicitly imported as Vue elements making use of the? component suffix:.bring in NuxtSvg from '~/ assets/svg/nuxt. svg'.//.URL.SVGs may be imported as URLs making use of the? url suffix:.import nuxtSvgUrl coming from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs may be imported as raw strings utilizing the? uncooked suffix:.bring in nuxtSvgRaw from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.