This boilerplate makes developing static html sites easy by allowing html imports.
Transform this:
<!-- views/index.html -->
<div>
${require('../partials/header.html')}
<h1>Hello, World!</h1>
</div>
<!-- partials/header.html -->
<div>
My site
</div>
into this:
<!-- views/index.html -->
<div>
<div>
My site
</div>
<h1>Hello, World!</h1>
</div>
Inspired by this blog post from extri.co.
$ git clone https://github.com/jverneaut/webpack-static-boilerplate
$ npm install
$ # Starts a development server on port 4000 with auto relaod
$ npm run watch
To build for production use
$ npm run build
Use ${require(./myFile.html)}
to include external html files.