Cannot resolve files from absolute paths
duddu opened this issue · comments
Davide Doronzo commented
I just switched to this jade loader, since it is the first one rightly using pug. So thank you!
I get the error above, e.g. when an img src is an absolute url: in that case, the loader breaks trying to request file ./\"http://....png\"
biouda commented
@duddu I compared this loader with jade-html-loader and found the problem:
let content = JSON.stringify(template(query))
If you try to rewrite source code of loader to
let content = template(query)
everything will work
also I changed
return `module.exports = ${content};`
to
return content
because module.exports =
string always appeared in my output html
biouda commented
Thank you! :) Could you also update npm package please?) Not very
comfortable to use npm i <git repo>