-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
56 lines (45 loc) · 1.14 KB
/
webpack.config.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
45
46
47
48
49
50
51
52
53
54
55
56
/* @flow */
var webpack = require('webpack')
module.exports = {
plugins: [
new webpack.NormalModuleReplacementPlugin(/^react$/, 'react/addons'),
new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(/vertx/)
],
entry: {
'bundle.js': [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/dev-server',
'./client/app/index.jsx'
]
},
output: {
path: __dirname + '/client/build/',
filename: '[name]',
publicPath: '/build/'
},
resolve: {
extensions: ['', '.js', '.jsx', 'index.js', 'index.jsx', '.styl']
},
module: {
preLoaders: [
{ test: /\.json$/, loader: 'json'}
],
loaders: [
{ test: /\.jsx$/, loader: 'react-hot!babel?stage=0', exclude: [/node_modules/] },
{ test: /\.js$/, loader: 'babel?stage=0', exclude: [/node_modules/] },
{ test: /\.styl$/, loader: 'style!css!stylus' },
{ test: /\.css$/, loader: 'style!css' }
]
},
externals: {
APIHOST: '"http://localhost:3004"'
},
devServer: {
publicPath: '/build/',
contentBase: 'client/',
hot: true,
quiet: true
},
devtool: '#eval'
}