Sleep

Nuxt Svgo Loading Machine - Vue.js Feed #.\n\nNuxt module to pack SVG data as Vue elements, utilizing SVGO for marketing.\nFeatures.\nTons SVG files as Vue components.\nEnhance SVGs utilizing SVGO.\nSmooth integration along with Nuxt DevTools.\nSetup.\nInstall and add nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your bundle manager.pnpm include -D nuxt-svgo-loader.npm set up -D nuxt-svgo-loader.yarn include -D nuxt-svgo-loader.export nonpayment defineNuxtConfig( elements: [' nuxt-svgo-loader'],.svgoLoader: // Alternatives listed here will definitely be exchanged 'vite-svg-loader'. ).[NOTE] Given that nuxt-svgo-loader is actually a Nuxt element based on vite-svg-loader, the configuration for svgoLoader continues to be exact same to that of vite-svg-loader. You may describe the records of vite-svg-loader for the offered options listed here.Usage.Component.SVGs could be explicitly imported as Vue elements making use of the? part suffix:.import NuxtSvg coming from '~/ assets/svg/nuxt. svg'.//.URL.SVGs can be imported as Links utilizing the? url suffix:.bring in nuxtSvgUrl from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs could be imported as raw strands using the? raw suffix:.bring in nuxtSvgRaw from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In