Sleep

Nuxt Svgo Loading Machine - Vue.js Nourished #.\n\nNuxt component to pack SVG documents as Vue components, using SVGO for optimization.\nFunctions.\nLoad SVG submits as Vue elements.\nImprove SVGs making use of SVGO.\nSeamless assimilation along with Nuxt DevTools.\nInstallation.\nMount as well as include nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your plan manager.pnpm add -D nuxt-svgo-loader.npm put in -D nuxt-svgo-loader.yarn include -D nuxt-svgo-loader.export nonpayment defineNuxtConfig( elements: [' nuxt-svgo-loader'],.svgoLoader: // Possibilities listed here will be exchanged 'vite-svg-loader'. ).[TAKE NOTE] Given that nuxt-svgo-loader is actually a Nuxt element based on vite-svg-loader, the arrangement for svgoLoader remains identical to that of vite-svg-loader. You can easily refer to the information of vite-svg-loader for the readily available options here.Consumption.Component.SVGs could be clearly imported as Vue parts making use of the? component suffix:.import NuxtSvg from '~/ assets/svg/nuxt. svg'.//.URL.SVGs could be imported as URLs using the? url suffix:.import nuxtSvgUrl from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs can be imported as uncooked cords utilizing the? fresh suffix:.import nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.