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

223
Visualizações
webpack 5: webpack-dev-server is not hot-reloading

Currently I am learning to use Webpack. In the course of this I am building up a boilerplate. To make the development a bit faster and more dynamic, I would like to use the webpack-dev-server. This can also be started correctly. The problem is that changes are not visible. Even if I refresh the page manually, the changes are not there.

My folder strucure:

├── dist
│   └── bundle.js
├── src
│   ├── scss
│   │   └── app.scss
    └── index.js
├── webpack.config.js
├── package.json
├── package.lock.json
└── index.html

My webpack-config:

const path = require("path");

module.exports = {
    entry: './src/index.js',
    mode: "development",
    cache: true,
    output: {
        filename: 'bundle.js',
        path: path.resolve(__dirname, 'dist'),
        publicPath: path.resolve(__dirname, '')
    },
    module: {
        rules: [
          {
            test: /\.s[ac]ss$/i,
            use: [
                "style-loader",
                "css-loader",
                "sass-loader",
            ],
          }
          }
        ],
    },
    devServer: {
        static: "./",
        compress: true,
        port: 9000,
        hot: true
    },
}

For example, I make a change in app.scss. This only becomes visible when I bundle webpack. I know that the dev-server returns the data from the memory and does not write the changes to the files.

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