Sleep

Nuxt Svgo Loading Machine - Vue.js Nourished #.\n\nNuxt module to pack SVG files as Vue parts, utilizing SVGO for marketing.\nFeatures.\nLots SVG files as Vue components.\nMaximize SVGs making use of SVGO.\nSmooth integration along with Nuxt DevTools.\nSetup.\nPut in as well as incorporate nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package manager.pnpm incorporate -D nuxt-svgo-loader.npm install -D nuxt-svgo-loader.anecdote add -D nuxt-svgo-loader.export nonpayment defineNuxtConfig( modules: [' nuxt-svgo-loader'],.svgoLoader: // Options right here will be exchanged '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 remains exact same to that of vite-svg-loader. You can refer to the records of vite-svg-loader for the readily available alternatives listed here.Usage.Element.SVGs could be clearly imported as Vue elements utilizing the? component suffix:.import NuxtSvg from '~/ assets/svg/nuxt. svg'.//.URL.SVGs could be imported as Links utilizing the? url suffix:.import nuxtSvgUrl coming from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs can be imported as fresh strands making use of the? raw suffix:.bring in nuxtSvgRaw from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In