- Full-Stack React Projects
- Shama Hoque
- 43字
- 2021-06-25 21:45:13
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>
<p id="root"></p> <script type="text/javascript" src="/dist/bundle.js"></script>
</body>