File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -24,23 +24,25 @@ let configEnv;
24
24
25
25
if ( ENV === 'development' ) {
26
26
configEnv = {
27
- entry : {
27
+ entry : isTest ? ( {
28
28
'test' : glob . sync ( path . resolve ( __dirname , 'test/*.js' ) )
29
- } ,
29
+ } ) : ( { } ) ,
30
30
31
31
output : {
32
32
filename : '[name].js' ,
33
33
publicPath : '/'
34
34
} ,
35
35
36
- rules : [ {
37
- enforce : 'pre' ,
38
- test : / \. j s $ / ,
39
- include : path . resolve ( __dirname , 'test' ) ,
40
- use : [ {
41
- loader : 'jshint-loader'
42
- } ]
43
- } ] ,
36
+ rules : [
37
+ isTest ? ( {
38
+ enforce : 'pre' ,
39
+ test : / \. j s $ / ,
40
+ include : path . resolve ( __dirname , 'test' ) ,
41
+ use : [ {
42
+ loader : 'jshint-loader'
43
+ } ]
44
+ } ) : ( { } )
45
+ ] ,
44
46
45
47
devtool : 'inline-source-map' ,
46
48
@@ -59,7 +61,7 @@ if (ENV === 'development') {
59
61
proxy : {
60
62
'/dist' : {
61
63
target : 'http://' + devServerHost + ':' + devServerPort ,
62
- pathRewrite : { '^/dist' : '' }
64
+ pathRewrite : { '^/dist' : '' }
63
65
}
64
66
} ,
65
67
inline : true ,
@@ -150,7 +152,7 @@ module.exports = {
150
152
}
151
153
]
152
154
} ,
153
-
155
+
154
156
plugins : configEnv . plugins ,
155
157
156
158
devServer : configEnv . devServer ,
You can’t perform that action at this time.
0 commit comments