-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack-dev-server.js
44 lines (39 loc) · 1018 Bytes
/
webpack-dev-server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Imports
//
var path = require('path');
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var wpConfig = require('./build_config/webpack.devserver.conf.js');
//
// Webpack
//
var wpServer = new WebpackDevServer(webpack(wpConfig), {
contentBase: wpConfig.output.path,
publicPath: '/assets/video-ui/build/',
public: "video-assets.local.dev-gutools.co.uk",
hot: true,
progress: true,
noInfo: true,
disableHostCheck: true,
clientLogLevel: "info",
watchOptions: {
aggregateTimeout: 300,
poll: 1000
},
quiet: false,
headers: {
'X-Custom-Header': 'yes',
'Access-Control-Allow-Origin' : '*'
},
stats: {
colors: true
}
});
//
// Exports
//
//wpServer.use('/public', express.static('public'));
wpServer.listen(wpConfig.devServer.port, wpConfig.devServer.address, function() {
console.log('WebpackDevServer listening on port %d', wpConfig.devServer.port);
});