Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

141
Visualizações
Webpack-dev-server doesn't refresh the app with custom host

I'm developing a react app and until I was running my dev server just on https://localhost everything was ok, i.e. the app was hot refreshed everytime I clicked "save" in my IDE.

Then I've added a new entry in my etc/hosts file:

127.0.0.1 localhost localhost.myDomain.local

and configured devServer like this:

export const devConfig: Configuration = {
  mode: "development",
  devtool: "eval-source-map",
  devServer: {
    port: 443,
    hot: true,
    open: true,
    historyApiFallback: true,
    https: true,
    allowedHosts: "all",
    host: "localhost.myDomain.local",
  },
  plugins: [new ReactRefreshWebpackPlugin()],
};

When I now start the server it opens a new tab in my browser with https://localhost.myDomain.local. Looks alright at first glance. But saving changes in my IDE doesn't make the browser hot refresh the page. I need to manually refresh it to see them.

I flushed DNS cache but it didn't help. Passing { forceEnable: true } as an arg to ReactRefreshWebpackPlugin didn't work either. Is there a chance to make it work?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda