Open felipefialho opened 5 years ago
I have a similar problem, but with images. As a temporary solution, I create a new .pug template with "require" part. Then, I included this new file into the file with mixin. Smth like that: img.pug
img(src=require("./image.png"))
mix.pug
mixin mix(data)
div Some Text
include img.pug
index.pug
div Some Title
include mix
+mix('some data')
may be a bit later, but... I had same problem by include a template like follow from a sub directory:
include mixins
img(src=require('./image.jpeg'))
This issue is fixed in the alternative pug-loader
You can simply do: npm install pug-loader npm install pug
Hi, I tried help here (https://github.com/pugjs/pug/issues/3164) before.
Pug Version: 2.0.4
Node Version: v11.10.0
Input JavaScript Values
Input Pug
Additional Comments
If I remove mixin,
require
works fine and compile as expected. But when I used mixin I get the follows errors:Maybe this is an issue for
pug-loader
.Thanks!