Sleep

Nuxt Svgo Loader - Vue.js Nourished #.\n\nNuxt module to pack SVG documents as Vue elements, utilizing SVGO for optimization.\nFunctions.\nBunch SVG files as Vue parts.\nEnhance SVGs making use of SVGO.\nSmooth assimilation with Nuxt DevTools.\nInstallation.\nMount as well as include nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your bundle manager.pnpm add -D nuxt-svgo-loader.npm put in -D nuxt-svgo-loader.yarn add -D nuxt-svgo-loader.export default defineNuxtConfig( elements: [' nuxt-svgo-loader'],.svgoLoader: // Alternatives below will certainly be actually exchanged 'vite-svg-loader'. ).[TAKE NOTE] Because nuxt-svgo-loader is a Nuxt component based on vite-svg-loader, the configuration for svgoLoader stays exact same to that of vite-svg-loader. You can easily describe the records of vite-svg-loader for the offered choices listed below.Use.Element.SVGs can be clearly imported as Vue parts making use of the? element suffix:.bring in NuxtSvg from '~/ assets/svg/nuxt. svg'.//.LINK.SVGs could be imported as URLs using the? link suffix:.import nuxtSvgUrl from '~/ assets/svg/nuxt. svg?url'.// nuxtSvgUrl === '/ _ nuxt/assets/svg/ nuxt.svg'.Raw.SVGs can be imported as uncooked cords utilizing the? fresh suffix:.import nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In