Browse Source

修改端口为5757

sunjh 6 years ago
parent
commit
d7087a532c
2 changed files with 2 additions and 1 deletions
  1. 1 0
      build/webpack.dev.conf.js
  2. 1 1
      config/index.js

+ 1 - 0
build/webpack.dev.conf.js

@@ -23,6 +23,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
   // these devServer options should be customized in /config/index.js
   // these devServer options should be customized in /config/index.js
   devServer: {
   devServer: {
     clientLogLevel: 'warning',
     clientLogLevel: 'warning',
+    disableHostCheck: true, //  开发环境使用true方便开发,生产环境使用false
     historyApiFallback: {
     historyApiFallback: {
       rewrites: [
       rewrites: [
         { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
         { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },

+ 1 - 1
config/index.js

@@ -14,7 +14,7 @@ module.exports = {
 
 
     // Various Dev Server settings
     // Various Dev Server settings
     host: 'localhost', // can be overwritten by process.env.HOST
     host: 'localhost', // can be overwritten by process.env.HOST
-    port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
+    port: 5757, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     autoOpenBrowser: false,
     errorOverlay: true,
     errorOverlay: true,
     notifyOnErrors: true,
     notifyOnErrors: true,