Offers a dev middleware for webpack, which arguments a live bundle to a directory
THIS MIDDLEWARE SHOULD ONLY USED FOR DEVELOPMENT!
DO NOT USE IT IN PRODUCTION!
It's a simple wrapper middleware for webpack. It serves the files emitted from webpack over a connect server.
It has a few advantages over bundling it as files:
var webpackMiddleware = ;app;
This part shows how you might interact with the middleware during runtime:
close(callback) - stop watching for file changes
var webpackDevMiddlewareInstance = ;app;// After 10 seconds stop watching for file changes:;
invalidate() - recompile the bundle - e.g. after you changed the configuration
var compiler = ;var webpackDevMiddlewareInstance = ;app;;
waitUntilValid(callback) - executes the
callback if the bundle is valid or after it is valid again:
var webpackDevMiddlewareInstance = ;app;webpackDevMiddleware;