glook / webpack-typescript-react

Webpack 5 boilerplate with support of most common loaders and modules (see tags and description)
MIT License
217 stars 54 forks source link

Why is the devserverHost of non-windows is 0.0.0.0 #17

Closed Hujianboo closed 2 years ago

Hujianboo commented 2 years ago

My development machine is a mac. When I started it, I found that the js file could not be found, and the js path address was found to be 0.0.0.0. The correct path is 127.0.0.1 export const devServerHost = isWindows() ? '127.0.0.1' : '0.0.0.0';

glook commented 2 years ago

Hi, you are using safari, right?

Hujianboo commented 2 years ago

Hi, you are using safari, right?

chrome :-)

Hujianboo commented 2 years ago

Excuse me, under what scenarios do I need a 0.0.0.0 address? I don't think this place is necessary to make such judgments, right? I don’t seem to have encountered this problem before, and I want to know the specific reason. thx

glook commented 2 years ago

Hi, i checked it again and got that you are right. I cant find any reason to use 0.0.0.0 as default host for any non windows machines. In 1.0.7 host property was removed from devServer config.