//config/inex.js
// Various Dev Server settings
host: '0.0.0.0', // 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
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
将 host 属性从 localhost 改为 0.0.0.0
则启动服务器后,从相同网段可以访问,解决了手机和电脑同时测试的问题。