Updating the template to load a bundled script

In order to add the bundled frontend code in the HTML view, we will update the template.js file to add the script file from the dist folder to the end of the <body> tag.

mern-skeleton/template.js:

...<body>    <div id="root"></div>
    <script type="text/javascript" src="/dist/bundle.js"></script></body>

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.