Sleep

Nuxt Svgo Loading Machine - Vue.js Nourished #.\n\nNuxt module to fill SVG data as Vue parts, utilizing SVGO for optimization.\nFunctions.\nBunch SVG files as Vue components.\nImprove SVGs using SVGO.\nSmooth integration along with Nuxt DevTools.\nInstallation.\nPut in and add nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package deal supervisor.pnpm add -D nuxt-svgo-loader.npm install -D nuxt-svgo-loader.yarn include -D nuxt-svgo-loader.export default defineNuxtConfig( components: [' nuxt-svgo-loader'],.svgoLoader: // Options listed below will be exchanged 'vite-svg-loader'. ).[KEEP IN MIND] Given that nuxt-svgo-loader is actually a Nuxt element based on vite-svg-loader, the configuration for svgoLoader stays identical to that of vite-svg-loader. You can easily describe the information of vite-svg-loader for the readily available options here.Usage.Part.SVGs could be explicitly imported as Vue elements making use of the? element suffix:.bring in NuxtSvg from '~/ assets/svg/nuxt. svg'.//.LINK.SVGs could be imported as Links using the? url suffix:.bring in nuxtSvgUrl from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs could be imported as fresh cords using the? uncooked suffix:.bring in nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In