'use strict';/* eslint no-param-reassign: 'off' */constcreateDomain=require('./createDomain');module.exports=functionaddDevServerEntrypoints(webpackOptions,devServerOptions,listeningApp){if(devServerOptions.inline!==false){// we're stubbing the app in this method as it's static and doesn't require// a listeningApp to be supplied. createDomain requires an app with the// address() signature.constapp=listeningApp||{address(){return{port:devServerOptions.port};}};constdomain=createDomain(devServerOptions,app);constdevClient=[`${require.resolve('../../client/')}?${domain}`];if(devServerOptions.hotOnly){devClient.push('webpack/hot/only-dev-server');}elseif(devServerOptions.hot){devClient.push('webpack/hot/dev-server');}[].concat(webpackOptions).forEach((wpOpt)=>{if(typeofwpOpt.entry==='object'&&!Array.isArray(wpOpt.entry)){Object.keys(wpOpt.entry).forEach((key)=>{wpOpt.entry[key]=devClient.concat(wpOpt.entry[key]);});}elseif(typeofwpOpt.entry==='function'){wpOpt.entry=wpOpt.entry(devClient);}else{wpOpt.entry=devClient.concat(wpOpt.entry);}});}};