Sleep

Nuxt Svgo Loading Machine - Vue.js Feed #.\n\nNuxt component to load SVG data as Vue elements, making use of SVGO for optimization.\nAttributes.\nLots SVG submits as Vue elements.\nOptimize SVGs using SVGO.\nSmooth integration with Nuxt DevTools.\nSetup.\nPut up and incorporate nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package supervisor.pnpm incorporate -D nuxt-svgo-loader.npm set up -D nuxt-svgo-loader.anecdote include -D nuxt-svgo-loader.export nonpayment defineNuxtConfig( elements: [' nuxt-svgo-loader'],.svgoLoader: // Possibilities listed here are going to be exchanged 'vite-svg-loader'. ).[TAKE NOTE] Considering that nuxt-svgo-loader is actually a Nuxt module based upon vite-svg-loader, the configuration for svgoLoader remains the same to that of vite-svg-loader. You can easily pertain to the paperwork of vite-svg-loader for the on call alternatives right here.Utilization.Element.SVGs may be clearly imported as Vue elements making use of the? element suffix:.import NuxtSvg from '~/ assets/svg/nuxt. svg'.//.URL.SVGs may be imported as Links making use of the? link suffix:.import nuxtSvgUrl coming from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs could be imported as fresh strings using the? raw suffix:.bring in nuxtSvgRaw from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In