Saturday 27 April 2019

Are there drawbacks to “including” files you don't require in PUG?

I want to load a different mixin depending on what data the pug file gets passed. This requires me to store mixins as a variable. e.g.+#{slug}()where slug is the variable. This works well but (because dynamic mixins aren't possible) the drawback is I have to "include" all the pug files (even one's which are never required)include ./mixins/slug1include ./mixins/slug2include ./mixins/slug3etc ...Are there drawbacks to including loads of pug files you don't need? Or is it the case where if you just "include", but never actually call the file then it's all ok? Thanks for any help :)

Submitted April 27, 2019 at 06:13PM by harrydry

No comments:

Post a Comment