Вот что есть:
'use strict';
const path = require('path');
module.exports = {
mode: 'development',
devtool: 'source-map',
entry: { main: './src/es6/index.js' },
output: {
path: path.resolve(__dirname, 'js'),
filename: 'main.js',
library: "qzilla"
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.(html)$/,
exclude: /node_modules/,
use: {
loader: 'html-loader',
options: {
attrs: [':data-src'],
minimize: false,
conservativeCollapse: false,
interpolate: true
}
}
}
]
},
};
let count = 5;
let question = require('./template/question/question-wrap.html');
positionInner.insertAdjacentHTML('beforeend', question);
<div class="question-wrap__title">Как сюда передать переменную count?</div>