Sleep

Nuxt Svgo Loading Machine - Vue.js Nourished #.\n\nNuxt element to load SVG data as Vue parts, utilizing SVGO for marketing.\nFunctions.\nTons SVG submits as Vue elements.\nImprove SVGs using SVGO.\nSmooth combination with Nuxt DevTools.\nSetup.\nSet up as well as incorporate nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package deal manager.pnpm incorporate -D nuxt-svgo-loader.npm set up -D nuxt-svgo-loader.yarn add -D nuxt-svgo-loader.export default defineNuxtConfig( modules: [' nuxt-svgo-loader'],.svgoLoader: // Alternatives right here will definitely be actually exchanged 'vite-svg-loader'. ).[TAKE NOTE] Because nuxt-svgo-loader is actually a Nuxt component based on vite-svg-loader, the configuration for svgoLoader remains the same to that of vite-svg-loader. You can easily refer to the documentation of vite-svg-loader for the on call alternatives right here.Usage.Element.SVGs can be clearly imported as Vue parts utilizing the? element suffix:.bring in NuxtSvg from '~/ assets/svg/nuxt. svg'.//.LINK.SVGs could be imported as URLs utilizing the? link suffix:.import nuxtSvgUrl coming from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs may be imported as fresh cords using the? raw suffix:.bring in nuxtSvgRaw from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.