An example barebones project for dynamically processing all Pug templates in a directory to output individual HTML files.
Based on a Stack Overflow question: Can Webpack build multiple HTML files from SCSS and Pug?
Uses html-webpack-pug-plugin
and html-webpack-plugin
to loop through a given directory that contains Pug files and outputs the resulting HTML file for each template in another directory via a simple loop in the Webpack configuration.
Install packages and run script:
npm install
npm run build