A basic Webpack configuration to create simple static sites with Handlebars (or HTML or Pug) and SCSS.
git clone https://github.com/sntiagomoreno/static-webpack.git static-site
Get into your project folder:
cd static-site
Remove this repo versioning files
rm -rf .git
yarn install
All static pages are generated by the html-webpack-plugin. You can edit your page settings config/pages.config.js
to match your requirements.
extension //hbs, pug/jade or html
Defaulthbs
.inject //false, head or body
Defaultbody
.pages //Array of page objects
title
andfilename
are required.
This enables webpack-dev-server for Hot Module Replacement. It also uses browser-sync for a quick way of accessing your site from an external IP. See more browser-sync options.
yarn dev
yarn build