Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138279

How to bundle every external and inline JS script within a HTML file

$
0
0

I currently have a project that has hundreds of external and inline JS classes.

Index.html:

<script src="./src/thing1.js></script>
<script src="./src/thing2.js></script>
<script src="./src/thing3.js></script>
...
<script src="./src/thing305.js></script>
<script>
   var exScript1 = "test";
</script>
<script>
   var exScript2 = "test";
</script>
...
<script>
   var exScript302 = "test";
</script>

What is the easiest way to bundle all of those external and inline scripts into a single script or inline HTML file?

Note: Webpack and the like take a javascript entry point, so I'd have to list every file as an entry point, which is out of the question.


Viewing all articles
Browse latest Browse all 138279

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>