Express Webpack Builder
A simple Webpack builder that can run and hot reload a client app as well as automatically restart an Express server when changes are detected.
In your build script (eg.
#! /usr/bin/env nodeconst Builder = ;Builder;
So when you run
bin/build hot (assuming it has execute permission)
you should get a server running at
http://localhost:5000 with hot reload.
Client code changes will hot reload in the browser.
Server code changes will automatically restart the server.
The server location is guessed from your
main value or can be specified using a second parameter
Webpack Config Helper
const Builder = ;moduleexports = Builder; // Use the defaults
Or you can define more things:
const Builder = ;moduleexports = Builder;
Or be even more specific...
const Builder = ;let config = Builder;configoutputpath = `/dist`;moduleexports = config;
Builder.HtmlWebpackPlugin is a shortcut to
html-webpack-plugin and uses the same config.