L
L
liltrill2019-10-22 23:46:54
JavaScript
liltrill, 2019-10-22 23:46:54

How to store html code for js in a separate file?

In general, you need to store html in a separate file so that during compilation the variable that refers to the file is filled with content, such as innerHTML.
let div = path/file.html;
To have the html in the div from the file

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2019-10-23
@liltrill

https://github.com/webpack-contrib/html-loader

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question