@@ -7,19 +7,25 @@ module.exports = {
7
7
: 'http://localhost:8080/' ,
8
8
outputDir : '../modoboa_contacts/static/' ,
9
9
assetsDir : 'modoboa_contacts' ,
10
- devServer : {
11
- publicPath : 'http://localhost:8080/' ,
12
- headers : {
13
- 'Access-Control-Allow-Origin' : '*' ,
14
- 'Access-Control-Allow-Methods' : 'GET, POST, PUT, DELETE, PATCH, OPTIONS' ,
15
- 'Access-Control-Allow-Headers' :
16
- 'X-Requested-With, content-type, Authorization' ,
17
- 'Access-Control-Allow-Credentials' : 'true'
18
- }
19
- } ,
20
- configureWebpack : config => {
21
- config . plugins . push ( new BundleTracker ( {
22
- path : '../modoboa_contacts/static/modoboa_contacts/'
23
- } ) ) ;
10
+ chainWebpack : config => {
11
+ config
12
+ . plugin ( 'BundleTracker' )
13
+ . use ( BundleTracker , [ {
14
+ filename : path . join ( '../modoboa_contacts/static/modoboa_contacts/' , 'webpack-stats.json' )
15
+ } ] )
16
+
17
+ config . devServer
18
+ . public ( 'http://localhost:8080' )
19
+ . port ( 8080 )
20
+ . hotOnly ( true )
21
+ . watchOptions ( { poll : 1000 } )
22
+ . https ( false )
23
+ . headers ( {
24
+ 'Access-Control-Allow-Origin' : '*' ,
25
+ 'Access-Control-Allow-Methods' : 'GET, POST, PUT, DELETE, PATCH, OPTIONS' ,
26
+ 'Access-Control-Allow-Headers' :
27
+ 'X-Requested-With, content-type, Authorization' ,
28
+ 'Access-Control-Allow-Credentials' : 'true'
29
+ } )
24
30
}
25
31
}
0 commit comments