Webpack cannot dynamically set html content in the html, of require in js

footer.html

clipboard.png

footer.js

clipboard.png

html has been rendered, but the value of span is still the original value.
how to set the value of span dynamically?


has nothing to do with webpack. Your code is equivalent to

.
var footer = '<footer><span></span></footer>'

footer = $(footer).find('span').text('sss').parent()[0].outerHTML
Menu