
上QQ阅读APP看书,第一时间看更新
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>