I have a header.html
file
And I have an
Note that the interpolate option was removed in html-loader v1.0.0. The solution works with html-loader v0.5.5 and ${require('./header.html')}
EDIT: This answer is not valid anymore with html-loader
> 0.5.5
You need to enable interpolation
like this:
module: {
rules: [
{
test: /\.html$/,
use: {
loader: 'html-loader',
options: {
interpolate: true
}
}
}
]
},
Source for my answer, this question/answer.