Sleep

Nuxt Svgo Loader - Vue.js Nourished #.\n\nNuxt element to pack SVG data as Vue elements, making use of SVGO for optimization.\nFunctions.\nLoad SVG submits as Vue components.\nOptimize SVGs using SVGO.\nSeamless combination with Nuxt DevTools.\nSetup.\nInstall and incorporate nuxt-svgo-loader to your nuxt.config.\n

Whichever matches your package supervisor.pnpm add -D nuxt-svgo-loader.npm mount -D nuxt-svgo-loader.anecdote include -D nuxt-svgo-loader.export default defineNuxtConfig( modules: [' nuxt-svgo-loader'],.svgoLoader: // Options right here will certainly be exchanged 'vite-svg-loader'. ).[NOTE] Given that nuxt-svgo-loader is actually a Nuxt module based upon vite-svg-loader, the setup for svgoLoader stays identical to that of vite-svg-loader. You may refer to the paperwork of vite-svg-loader for the available alternatives listed here.Usage.Part.SVGs may be clearly imported as Vue parts utilizing the? part suffix:.import NuxtSvg coming from '~/ assets/svg/nuxt. svg'.//.URL.SVGs may be imported as URLs 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 raw strands utilizing the? fresh suffix:.import nuxtSvgRaw coming from '~/ assets/svg/nuxt. svg?raw'.// nuxtSvgRaw === '.

Articles You Can Be Interested In