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