浏览代码

修改端口为5757

sunjh 6 年之前
父节点
当前提交
d7087a532c
共有 2 个文件被更改,包括 2 次插入1 次删除
  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
   devServer: {
     clientLogLevel: 'warning',
+    disableHostCheck: true, //  开发环境使用true方便开发,生产环境使用false
     historyApiFallback: {
       rewrites: [
         { 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
     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,
     errorOverlay: true,
     notifyOnErrors: true,