File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,13 @@ var HtmlWebpackPlugin = require('html-webpack-plugin')
55// eval-source-map is faster for development
66config . devtool = 'eval-source-map'
77
8- // add hot-reload related code to entry chunk
9- config . entry . app = [
10- 'eventsource-polyfill' ,
11- 'webpack-hot-middleware/client?quiet=true' ,
12- config . entry . app
13- ]
8+ // add hot-reload related code to entry chunks
9+ var polyfill = 'eventsource-polyfill'
10+ var hotClient = 'webpack-hot-middleware/client?quiet=true'
11+ Object . keys ( config . entry ) . forEach ( function ( name , i ) {
12+ var extras = i === 0 ? [ polyfill , hotClient ] : [ hotClient ]
13+ config . entry [ name ] = extras . concat ( config . entry [ name ] )
14+ } )
1415
1516// necessary for the html plugin to work properly
1617// when serving the html from in-memory
You can’t perform that action at this time.
0 commit comments