forked from acdlite/flummox-isomorphic-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
40 lines (38 loc) · 907 Bytes
/
webpack.config.dev.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
'use strict';
var webpack = require('webpack');
module.exports = {
devtool: 'inline-source-map',
entry: [
'webpack-dev-server/client?http://localhost:8081',
'webpack/hot/only-dev-server',
'./public/css/app.css',
'./src/client/app'
],
output: {
path: './public/js/',
filename: 'app.js',
publicPath: 'http://localhost:8081/js/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
})
],
resolve: {
extensions: ['', '.js']
},
module: {
loaders: [
{ test: /\.jsx?$/, loaders: ['react-hot', 'babel-loader'], exclude: /node_modules/ },
{ test: /\.css/, loader: 'style-loader!css-loader' }
]
},
devServer: {
contentBase: './public/',
hot: true,
inline: true,
port: 8081
}
};