What I want to accomplish is taking data that I have in a JSON file, then at compile time generate an unordered list of data (ul) and inject that list into an html file.

lets say I have a json file

['one','two','three']

when I build my project I want to create an html file called list which is just

list.html
<ul><li>one</li><li>two</li><li>three</li></ul>

then I plan on using

  <%= require('html-loader!./partials/quoteSection.html').default %>

to add my list to an actual HTML page, but does anyone know of a straight forward way to generate an html page using vanilla webpack project?

0

There are 0 best solutions below