Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!