I'm setting host = '0.0.0.0 to test the page on devices on my local network (iPhone, iPad, etc.). I'm also using open = true (default setting) to automatically open a browser window on startup. Unfortunately it opens the window at 0.0.0.0:8000 instead of localhost:8000. And consequently no page loads. I can fix this by setting useLocalIp = true, but I think that's counter-intuitive and works slightly different to what I really want (localhost). Could you improve this? Maybe set it to localhost automatically if the host is 0.0.0.0.
Closing as invalid. Please see the issue template.
I also encountered the same problem hate bad
@ipengyo Would you open another issue that follows their "template"?
"webpack": "4.16.1"
devServer: {
hot: true,
host: '0.0.0.0',
port: 3000,
open: true,
openPage: 'dashboard/',
publicPath: '/dashboard/',
contentBase: path.join(__dirname, 'Build'),
historyApiFallback: true
},
in browser : http://0.0.0.0:3000/dashboard/
devServer: {
hot: true,
host: '0.0.0.0',
port: 3000,
open: true,
openPage: 'dashboard/',
public: 'localhost:3000',
publicPath: '/dashboard/',
contentBase: path.join(__dirname, 'Build'),
historyApiFallback: true
},
work.
Most helpful comment
"webpack": "4.16.1"
in browser : http://0.0.0.0:3000/dashboard/
work.