Webpack middleware plugin for Hapi.js that integrates webpack-dev-middleware and webpack-hot-middleware to enable Hot Module Replacement (HMR) during development. Version 3.0.0 supports Hapi >= 17.x and webpack >= 2.x. It offers two usage modes: passing an object with compiler/assets/hot options, or a path to a webpack config file. Compared to alternatives like hapi-webpack-dev-middleware, this plugin bundles both middlewares and supports HMR out of the box. Release cadence is sporadic; last release was in 2018, and it is considered stable but unmaintained.
npm install hapi-webpack-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers the hapi-webpack-plugin with Hapi v17+, passing a webpack compiler and enabling HMR.
Use version 2.x.x for Hapi <= 16.x.
Install @hapi/hapi instead of hapi.
Ensure options object includes 'compiler', 'assets', and 'hot' correctly.
Export an object from webpack.config.js.
Upgrade to Hapi v17+ and use async registration.
npm install webpack-dev-middleware --save-dev
Call Webpack(config) to create compiler, then pass it.
Pass {compiler, assets, hot} in options.