Skip to content

How to configure custom svgs when using vite and nuxt plugin for vite #5531

@nickmarkfurness

Description

@nickmarkfurness

Package

v4.x

Description

I have followed the nuxt documentation to use a folder of svgs under assets, i only have x2 svgs at the minute.
I have created a nuxt.config.ts file at the root folder level alongside the package.json

export default defineNuxtConfig({ modules: ['@nuxt/ui', undefined], css: ['~/assets/css/main.css'], icon: { customCollections: [{ prefix: 'svg', dir: './assets/svg', recursive: true }] } })

Image

How ever when i try to add the icon to my page i don't see anything.

<UIcon name="i-svg-sidebar-logo-only:svg" />

I am using the latest and greatest version to date of all the components too.

Am i missing something ... is it possible to given the use of vite ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions