Skip to content

Load the SVG into a dynamic component #75

Open
@kissu

Description

@kissu

Hi ! 👋🏻
I was wondering if that kind of code may work <component is="svg-grey-home"></component>.

Because we have Nuxt components now, so maybe it is possible in any way.

Without having to use

<script>
export default {
  components: {
    SvgGreyHome: () => import('~/assets/svg/grey/home.svg'),
  },
}
</script>

In my case, writting <svg-grey-home></svg-grey-home> totally works (the setup is done for that) but I want to make it dynamic without the need to import it beforehand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions