How to configure the domain name with webpack devServer, and use the domain name to access the local server without ip.

as the title: how to configure the domain name with webpack devServer, and use the domain name to access the local server without ip.


you can map any domain name to any IP by modifying the native HOSTS file. For example,

127.0.0.1    www.example.com

this resolves the www.example.com domain name to 127.0.0.1 .

The main way to implement

is to modify the hosts mentioned above.
can use SwitchHosts to modify


the Emperor is right. Just set your local IP to the domain name you want to configure in the HOSTS file. Then change host to your configured domain name in config.js.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3fa86-44849.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3fa86-44849.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?