devServer.js 694 Bytes
Newer Older
Dan Abramov's avatar
Dan Abramov committed
1
2
3
4
5
6
7
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config.dev');

new WebpackDevServer(webpack(config), {
  publicPath: config.output.publicPath,
  historyApiFallback: true,
Dan Abramov's avatar
Dan Abramov committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  stats: {
    hash: false,
    version: false,
    timings: false,
    assets: false,
    chunks: false,
    modules: false,
    reasons: false,
    children: false,
    source: false,
    publicPath: false,
    colors: true,
    errors: true,
    errorDetails: true,
    warnings: true,
  }
Dan Abramov's avatar
Dan Abramov committed
24
25
26
27
28
29
}).listen(3000, 'localhost', function (err, result) {
  if (err) {
    return console.log(err);
  }
  console.log('Listening at http://localhost:3000/');
});