File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
99const SoundsPlugin = require ( 'sounds-webpack-plugin' )
1010const UglifyJsPlugin = require ( 'uglifyjs-webpack-plugin' )
1111const WebpackProgressOraPlugin = require ( 'webpack-progress-ora-plugin' )
12- const getServerPort = function ( portFile , defaultPort ) {
12+ const getServerPort = function ( portFile ) {
1313 try {
1414 require ( 'fs' ) . accessSync ( portFile , fs . R_OK | fs . W_OK )
1515
1616 return parseInt ( fs . readFileSync ( portFile , 'utf8' ) )
1717 } catch ( e ) {
18- return defaultPort
18+ return false
1919 }
2020}
2121const webpackConfig = {
@@ -177,8 +177,8 @@ module.exports = (env, argv) => {
177177 } ) ,
178178 new BrowserSyncPlugin (
179179 {
180- port : getServerPort ( './.bs-port' , 3000 ) ,
181- proxy : 'http://[::1]:' + getServerPort ( './.port' , 9090 ) ,
180+ port : getServerPort ( './.bs-port' ) || 3000 ,
181+ proxy : 'http://[::1]:' + ( getServerPort ( './.port' ) || 9090 ) ,
182182 files : [
183183 {
184184 match : config . refresh ,
You can’t perform that action at this time.
0 commit comments