Socket
Socket
Sign inDemoInstall

hapi-webpack-plugin-2

Package Overview
Dependencies
129
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hapi-webpack-plugin-2

Webpack middleware for Hapi. Supports HMR.


Version published
Weekly downloads
51
decreased by-55.26%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Hapi Webpack Plugin 2

Webpack middleware for Hapi. Supports HMR.

Prerequisites

These packages are a peer dependency for this plugin.

  • Hapi (tested on >= 17.0)
  • webpack (tested on >= 4.0)

Installation

npm i -D hapi-webpack-plugin-2

Usage

You can use this plugin in two ways.

1) With config object

const webpack = require('webpack');
const HapiWebpackPlugin = require('hapi-webpack-plugin-2');

server.register({
  plugin: HapiWebpackPlugin,
  options: {
    config: {
      compiler: webpack({
        // webpack options http://webpack.github.io
      }),
      assets: {
        // webpack-dev-middleware options https://github.com/webpack/webpack-dev-middleware
      },
      hot: {
        // webpack-hot-middleware options https://github.com/glenjamin/webpack-hot-middleware
      },
    },
  },
});

2) With configPath

const HapiWebpackPlugin = require('hapi-webpack-plugin-2');

server.register({
  plugin: HapiWebpackPlugin,
  options: {
    configPath: './webpack.config.js',
  },
});

Acknowledgement

This plugin is originally based on hapi-webpack-plugin which was in need of upgrading but seems to be abandoned. Among other issues, it is not compatible with Babel 7 and Webpack 4.

License

MIT

Keywords

FAQs

Last updated on 17 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc