Sleep

Nuxt Svgo Loading Machine - Vue.js Feed #.\n\nNuxt element to fill SVG files as Vue elements, using SVGO for optimization.\nComponents.\nTons SVG submits as Vue parts.\nOptimize SVGs using SVGO.\nSeamless combination along with Nuxt DevTools.\nInstallation.\nMount as well as add nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package deal manager.pnpm incorporate -D nuxt-svgo-loader.npm put in -D nuxt-svgo-loader.yarn add -D nuxt-svgo-loader.export default defineNuxtConfig( elements: [' nuxt-svgo-loader'],.svgoLoader: // Alternatives below will certainly be actually passed to 'vite-svg-loader'. ).[TAKE NOTE] Given that nuxt-svgo-loader is actually a Nuxt module based on vite-svg-loader, the configuration for svgoLoader stays exact same to that of vite-svg-loader. You can easily refer to the paperwork of vite-svg-loader for the on call choices listed here.Consumption.Element.SVGs can be explicitly imported as Vue parts using the? component suffix:.bring in NuxtSvg from '~/ assets/svg/nuxt. svg'.//.LINK.SVGs may be imported as Links 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 raw cords making use of the? raw suffix:.import nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In