Background
I am developing a game and I need to have the least possible requests sent to the server, I am making my own file bundler so I can combine separate files like index.html, index.js, and styles.css into a single HTML file where the js would be loaded in the head of index.html inside of script tags <script>like this<\script>. The same would be done with the CSS file but with style tags.
Problem
NodeJS doesnt have document so I cant just require the html file do ele.appendChild. The only other option that comes to my mind would be using REGEX but I would rather not use that.
TLDR
I need something that will let me do things like document.head.appendChild to an HTML file in nodejs.