Sleep

Nuxt Svgo Loader - Vue.js Feed #.\n\nNuxt module to fill SVG files as Vue elements, making use of SVGO for optimization.\nFunctions.\nBunch SVG files as Vue components.\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 manager.pnpm add -D nuxt-svgo-loader.npm install -D nuxt-svgo-loader.yarn include -D nuxt-svgo-loader.export default defineNuxtConfig( modules: [' nuxt-svgo-loader'],.svgoLoader: // Choices below will definitely be actually passed to 'vite-svg-loader'. ).[TAKE NOTE] Given that nuxt-svgo-loader is a Nuxt element based upon vite-svg-loader, the arrangement for svgoLoader remains identical to that of vite-svg-loader. You may describe the documents of vite-svg-loader for the accessible possibilities below.Utilization.Component.SVGs can be clearly imported as Vue components using the? element suffix:.bring in NuxtSvg coming from '~/ assets/svg/nuxt. svg'.//.LINK.SVGs could be imported as Links making use of the? url suffix:.bring in nuxtSvgUrl coming from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs can be imported as uncooked strings making use of the? raw suffix:.import nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In