Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this module with HapiJS ecosystem? #57

Closed
sathishsoundharajan opened this issue Jan 16, 2016 · 3 comments
Closed

How to use this module with HapiJS ecosystem? #57

sathishsoundharajan opened this issue Jan 16, 2016 · 3 comments

Comments

@sathishsoundharajan
Copy link

Can you provide an example of how to use this plugin with HapiJS ecosystem?

Below is the configuration i used with Hapi. Thats all i have configured. When i open my server @ localhost:3000 i got an error as below screen shot

webpack-dev-middleware

'use strict';

/* global __dirname */

const Webpack = require('webpack');
const Path = require('path');

module.exports = {
  'devtool': 'eval',
  'entry': [
    'webpack-hot-middleware/client?path=/__webpack_hmr&reload=true',
    './app/main.js'
  ],
  'output':{
    'path': __dirname + '/public/',
    'filename' : 'bundle.js',
    'publicPath' : '/'
  },
  'plugins':[
    new Webpack.optimize.OccurenceOrderPlugin(),
    new Webpack.HotModuleReplacementPlugin(),
    new Webpack.NoErrorsPlugin()
  ],
  'module': {
    'loaders':[
      {
        'test': /\.js$/,
        'include': Path.join(__dirname, 'app'),
        'loader': 'babel-loader'
      }
    ]
  }
};
@j
Copy link

j commented Jan 26, 2016

👍

@arb
Copy link

arb commented Feb 4, 2016

You can't. This module specifically hooks into the Express request lifecycle and middleware system. Check out https://www.npmjs.com/package/hapi-webpack-plugin for a possible hapi-compatible replacement.

@sathishsoundharajan
Copy link
Author

@arb Thanks. Will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants