File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -7,18 +7,19 @@ var isDev = process.env.NODE_ENV !== 'production';
7
7
8
8
module . exports = {
9
9
10
- devtool : 'cheap-eval-source-map' ,
10
+ devtool : isDev ? 'cheap-eval-source-map' : ' source-map',
11
11
12
12
entry : [
13
- path . join ( __dirname , 'client.js' ) ,
13
+ path . join ( __dirname , 'client.js' )
14
+ ] . concat ( isDev ? [
14
15
'webpack-dev-server/client?http://localhost:8080' ,
15
16
'webpack/hot/only-dev-server'
16
- ] ,
17
+ ] : [ ] ) ,
17
18
18
19
output : {
19
20
path : '__site__/' ,
20
21
filename : isDev ? '[name].js' : '[name]-[hash].js' ,
21
- publicPath : '' ,
22
+ publicPath : ''
22
23
} ,
23
24
24
25
target : 'web' ,
@@ -35,7 +36,7 @@ module.exports = {
35
36
{
36
37
test : / \. j s $ / ,
37
38
exclude : / n o d e _ m o d u l e s / ,
38
- loaders : [ 'react-hot-loader' , 'babel-loader' ]
39
+ loaders : isDev ? [ 'react-hot-loader' , 'babel-loader' ] : [ 'babel-loader' ]
39
40
} ,
40
41
{
41
42
test : / \. c s s $ / ,
You can’t perform that action at this time.
0 commit comments