Skip to content

prashaantt/hapi-webpack-dev-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hapi-webpack-dev-middleware

hapi plugin to use webpack-dev-middleware, possibly in conjunction with hapi-webpack-hot-middleware.

Dependency Status devDependency Status

Breaking change in 2.0

Upgraded to use Webpack 2.

Installation

$ npm install hapi-webpack-dev-middleware --save-dev

Usage

Require and register normally as a hapi plugin:

server.register(
    {
        register: require('hapi-webpack-dev-middleware'),
        options: {
            config: require('./webpack.config.js'),
            options: {
                noInfo: true,
                publicPath:  '/static'
            }
        }
    }
);

Configuration options:

  • config: The Webpack config to use.
  • options: The options you'd normally pass to webpack-dev-middleware. Refer to their documentation for all possible values.

Note: This plugin adds the webpackCompiler object to the server.app namespace to share it with any other plugins such as hapi-webpack-hot-middleware that depend on the same compiler being available to them.

License

MIT

About

Use webpack-dev-middleware in hapi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published