If I add the html-loader ({ test: /\.jade$/, loader: 'html-loader!jade-loader' }) which is supposed to require sources by default, I keep getting the 'Error: Module not found'. The console logs all the paths that it tried, all relative to the current working file.
I tried to give it some context, with context: path.resolve(__dirname + "/client"). It didn't work either.
I also tried to combine with the raw loader: raw-loader!html-loader!jade-loader. I don't get the error but the wepback output that is served is not my app at all, but instead something along the lines of:
var jade = require(/......) ....
I am trying to use jade-loader in combination with html-loader to be able to omit requires in jade. I have tried a few things, none of them worked.
By default jade-loader works when using
img(src=require("../../../../assets/images/imac.png") alt="computer")
, with the following webpack config:If I add the html-loader (
{ test: /\.jade$/, loader: 'html-loader!jade-loader' }
) which is supposed to require sources by default, I keep getting the 'Error: Module not found'. The console logs all the paths that it tried, all relative to the current working file.I tried to give it some context, with
context: path.resolve(__dirname + "/client")
. It didn't work either. I also tried to combine with the raw loader:raw-loader!html-loader!jade-loader
. I don't get the error but the wepback output that is served is not my app at all, but instead something along the lines of: var jade = require(/......) ....Do you have any idea ?
Thanks for your help