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

199
Vistas
How to automatically include PUG mixins in entry page?

Project: Webpack (js, cass, pug). Repo link My task is to convert all imports in the project to automatic. For CSS and JS, I followed the recommendations from the official Webpack website and in my case they work fine:

function importAll(context) {
  context.keys().map(context);
}

function importContext() {
  importAll((require.context('./../blocks', true, /.scss$|Init.js/)));
}

But I have no idea how to implement the same for the Pug includes. At the moment, I manually connect each Mixin:

include ../../blocks/block1/block1.pug
include ../../blocks/block2/block2.pug
include ../../blocks/block3/block3.pug

+block1()
+block2()
+block3()

Please advise a method by which you can automatically connect all mixins

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