forked from kimhjona/codeLaborate
-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
43 lines (43 loc) · 1 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
var path = require('path');
var webpack = require('webpack');
var BUILD = path.resolve(__dirname, 'src/client/public');
var CLIENT = path.resolve(__dirname, 'src/client/app');
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
CLIENT + '/components/index.js',
],
output: {
path: BUILD,
filename: 'bundle.js',
publicPath: '/public/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
devServer: {
hot: true,
inline: true,
port: 8080,
contentBase: './src/client'
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['react-hot', 'babel?presets[]=es2015,presets[]=react'],
include: path.join(__dirname, 'src')
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'
}
]
}
};