Sleep

Nuxt Svgo Loader - Vue.js Supplied #.\n\nNuxt module to pack SVG reports as Vue components, using SVGO for optimization.\nAttributes.\nLots SVG files as Vue parts.\nMaximize SVGs using SVGO.\nSmooth assimilation along with Nuxt DevTools.\nSetup.\nPut up as well as incorporate nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package deal manager.pnpm add -D nuxt-svgo-loader.npm mount -D nuxt-svgo-loader.yarn add -D nuxt-svgo-loader.export nonpayment defineNuxtConfig( components: [' nuxt-svgo-loader'],.svgoLoader: // Options below will certainly be actually passed to 'vite-svg-loader'. ).[KEEP IN MIND] Considering that nuxt-svgo-loader is actually a Nuxt component based upon vite-svg-loader, the arrangement for svgoLoader continues to be the same to that of vite-svg-loader. You may refer to the records of vite-svg-loader for the accessible alternatives here.Use.Component.SVGs can be explicitly imported as Vue elements utilizing the? part suffix:.import NuxtSvg from '~/ assets/svg/nuxt. svg'.//.LINK.SVGs could be imported as URLs making use of the? link suffix:.import nuxtSvgUrl from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs may be imported as fresh strands making use of the? raw suffix:.bring in nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In