When webpack develops multi-page applications, how to extract the common templates and write only the different parts of the pages?

I"ve used ejs , and then I searched for articles about how to extract public components.

what I want to do is in index.ejs , the template goes like this:

<html>
    <head>...</head>
    <body>
        <% include header %>
        xxxx
        <% include footer %>        
    </body>
</html>

then suppose I have a.html and b.html pages, and then want to configure webpack , I can only write in the a.html and b.html pages that need to be inserted into the xxxx location of index.ejs .

Mar.28,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea5e17-46ad2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea5e17-46ad2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?