Sleep

Nuxt Svgo Loading Machine - Vue.js Supplied #.\n\nNuxt element to pack SVG files as Vue parts, utilizing SVGO for optimization.\nComponents.\nTons SVG files as Vue components.\nEnhance SVGs using SVGO.\nSmooth integration along with Nuxt DevTools.\nSetup.\nPut in and also add nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your bundle manager.pnpm incorporate -D nuxt-svgo-loader.npm put up -D nuxt-svgo-loader.yarn incorporate -D nuxt-svgo-loader.export nonpayment defineNuxtConfig( elements: [' nuxt-svgo-loader'],.svgoLoader: // Options listed below will certainly be actually exchanged 'vite-svg-loader'. ).[NOTE] Since nuxt-svgo-loader is a Nuxt module based on vite-svg-loader, the configuration for svgoLoader remains identical to that of vite-svg-loader. You can describe the documentation of vite-svg-loader for the available options right here.Use.Component.SVGs may be clearly imported as Vue components using the? part suffix:.import NuxtSvg from '~/ assets/svg/nuxt. svg'.//.LINK.SVGs can 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 could be imported as fresh cords using the? fresh suffix:.bring in nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In