File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
const createDomain = require ( './createDomain' ) ;
6
6
7
- module . exports = function addDevServerEntrypoints ( webpackOptions , devServerOptions ) {
7
+ module . exports = function addDevServerEntrypoints ( webpackOptions , devServerOptions , listeningApp ) {
8
8
if ( devServerOptions . inline !== false ) {
9
- const domain = createDomain ( devServerOptions ) ;
9
+ // we're stubbing the app in this method as it's static and doesn't require
10
+ // a listeningApp to be supplied. createDomain requires an app with the
11
+ // address() signature.
12
+ const app = listeningApp || {
13
+ address ( ) {
14
+ return { port : devServerOptions . port } ;
15
+ }
16
+ } ;
17
+ const domain = createDomain ( devServerOptions , app ) ;
10
18
const devClient = [ `${ require . resolve ( '../../client/' ) } ?${ domain } ` ] ;
11
19
12
20
if ( devServerOptions . hotOnly ) { devClient . push ( 'webpack/hot/only-dev-server' ) ; } else if ( devServerOptions . hot ) { devClient . push ( 'webpack/hot/dev-server' ) ; }
You can’t perform that action at this time.
0 commit comments