0

I replaced the domain in the hosts file 127.0.0.1:8080 domain.com

But it did not help

This is my webpack.config

module.exports = merge(common, {
    mode: 'development',
    devtool: 'source-map',
    devServer: {
        historyApiFallback: true,
        contentBase: './dist',
        hot: true,
        host: '0.0.0.0',
        port: 80
    },
});
ZPPP
  • 1,567
  • 2
  • 18
  • 27
  • `/etc/hosts` does not support port specification, only domain: https://stackoverflow.com/questions/10729034/can-i-map-a-hostname-and-a-port-with-etc-hosts – Pavel Denisjuk Mar 14 '19 at 10:02
  • @PavelDenisjuk thanks Pavel already got it So can I make somethink like this another way? – ZPPP Mar 14 '19 at 10:06
  • Since I don't have access to your project, I tried to replicate the problem with create-react-app project, and successfully linked it with an actual domain name. `/etc/hosts` contains the `127.0.0.1 mydomain.com` mapping and devServer has a port `80`. Had to start it with `sudo` because it is a port below `1024`, but it did work. If you could provide a github repo it would be easier to help you out. – Pavel Denisjuk Mar 14 '19 at 10:30

0 Answers0