Sleep

Nuxt Svgo Loader - Vue.js Feed #.\n\nNuxt module to pack SVG data as Vue parts, using SVGO for marketing.\nComponents.\nBunch SVG files as Vue elements.\nOptimize SVGs making use of SVGO.\nSeamless assimilation with Nuxt DevTools.\nInstallation.\nInstall and also incorporate nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package deal supervisor.pnpm include -D nuxt-svgo-loader.npm set up -D nuxt-svgo-loader.yarn incorporate -D nuxt-svgo-loader.export default defineNuxtConfig( components: [' nuxt-svgo-loader'],.svgoLoader: // Options here will be actually passed to 'vite-svg-loader'. ).[NOTE] Given that nuxt-svgo-loader is actually a Nuxt module based upon vite-svg-loader, the arrangement for svgoLoader remains exact same to that of vite-svg-loader. You can describe the documents of vite-svg-loader for the available options right here.Usage.Element.SVGs could be explicitly imported as Vue components utilizing the? element suffix:.import NuxtSvg coming from '~/ assets/svg/nuxt. svg'.//.URL.SVGs may be imported as Links utilizing the? url suffix:.bring in nuxtSvgUrl coming from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs could be imported as fresh strands utilizing the? uncooked suffix:.import nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In