Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

106
Vistas
Vue component lazy load SVG

im trying to lazy load an SVG when my component loads, however when running npm run watch and the component attempts to build it is trying to find this file, of course when the component is compiled down the path it is lazy loading will be different, so i'm getting an error at the moment stating it's unable to locate the file.

My component will compile down to public_html/assets/js/chunks/[hash].js, and my SVG will be within public_html/assets/icons/manufacturer.svg.

How can I stop it trying to compile the path and only load it on load?

// component

    computed: {
        icon() {
            const icons = {
                manufacturer: () => import('../../icons/manufacturer.svg')
            }
            return icons['manufacturer'];
        },
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda