This demo is based on laravel-mix starter kit and its using ejs-compiled-loader to compile ejs files. other functionality and document should work as laravel-mix documentation.
You can find step by step guide from
npm install
npm start
npm run prod
new HtmlWebpackPlugin({
template: "ejs-compiled-loader!./src/index.ejs",
filename: "index.html",
inject: false
})
this will generate index.html file in dist folder and header/footer will be included, please check index.ejs file content.
we can use standerd ejs syntex
<% include /src/include/header.ejs %>
this file includes bootstrap directly from node_modules
please try this command if you receive sass error
npm install node-sass