Sleep

Nuxt Svgo Loader - Vue.js Nourished #.\n\nNuxt component to pack SVG documents as Vue elements, using SVGO for optimization.\nAttributes.\nLots SVG submits as Vue elements.\nOptimize SVGs making use of SVGO.\nSmooth integration along with Nuxt DevTools.\nInstallation.\nPut up and incorporate nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package deal supervisor.pnpm incorporate -D nuxt-svgo-loader.npm put in -D nuxt-svgo-loader.anecdote include -D nuxt-svgo-loader.export default defineNuxtConfig( elements: [' nuxt-svgo-loader'],.svgoLoader: // Possibilities below will definitely be actually passed to 'vite-svg-loader'. ).[KEEP IN MIND] Due to the fact that nuxt-svgo-loader is actually a Nuxt module based upon vite-svg-loader, the setup for svgoLoader stays the same to that of vite-svg-loader. You may pertain to the information of vite-svg-loader for the accessible options below.Use.Component.SVGs may be clearly imported as Vue parts utilizing the? element suffix:.bring in NuxtSvg coming from '~/ assets/svg/nuxt. svg'.//.URL.SVGs could be imported as Links making use of the? link suffix:.bring in nuxtSvgUrl coming from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs may be imported as fresh cords utilizing the? fresh suffix:.import nuxtSvgRaw from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In