Answer the question
In order to leave comments, you need to log in
Is there a way to fix issues with include and pug mixins when working with webpack2?
I found the following problems when working with pug in webpack:
1) the file-loader plugin with its src=require breaks the view mixins img(src="/img/#{imageName}.jpg")
simply by not recognizing that this is a variable and trying to load it as an image.
2) If you include the file with the code where they are used
in the file with variables- var droids = ["R2D2", "C3PO", "BB8"];
div
h1 Famous Droids from Star Wars
for name in droids
div.card
h2= name
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question