...
for (var title in titles) {
pluginsOptions.push(
new HtmlWebpackPlugin({
title: titles[title],
template: `./${title}/${title}.ejs`, // здесь убираем "ejs-render!"
chunks: [title],
filename: `${title}.html`
})
);
};
...
{
test: /\.ejs$/,
use: ['ejs-render-loader'] // указываем лоадер, который поставили
},
...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>TestTitle</title>
</head>
<body>
<%- include('logo', {class1: 'classContent1', class2: 'classContent2'}) %>
<hr>
<p>Custom content goes here.</p>
</body>
</html>
<div class="logo<%= class1 %><%= class2 %>">Logo goes here.</div>