Sleep

Nuxt Svgo Loader - Vue.js Feed #.\n\nNuxt component to fill SVG reports as Vue components, making use of SVGO for optimization.\nFunctions.\nLoad SVG files as Vue components.\nMaximize SVGs making use of SVGO.\nSmooth combination with Nuxt DevTools.\nInstallment.\nSet up and also include nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your bundle manager.pnpm include -D nuxt-svgo-loader.npm mount -D nuxt-svgo-loader.yarn add -D nuxt-svgo-loader.export nonpayment defineNuxtConfig( modules: [' nuxt-svgo-loader'],.svgoLoader: // Alternatives here will be exchanged 'vite-svg-loader'. ).[NOTE] Since nuxt-svgo-loader is actually a Nuxt element based on vite-svg-loader, the setup for svgoLoader continues to be exact same to that of vite-svg-loader. You can easily pertain to the documentation of vite-svg-loader for the readily available alternatives here.Use.Part.SVGs could be clearly imported as Vue elements utilizing the? element suffix:.bring in NuxtSvg coming from '~/ assets/svg/nuxt. svg'.//.LINK.SVGs may be imported as URLs making use of the? link suffix:.bring in nuxtSvgUrl from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs may be imported as fresh strands utilizing the? fresh suffix:.import nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In