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

86
Visualizações
Creating a custom hook in Webpack causes rescursive compilation

I have created a custom compiler hook that modifys the file system in my code. This triggers a recompilation, which triggers my hook, which triggers a recompilation, and so on and so forth.

I added the file that gets modified into my ignore options in my config, but that did not work. If it did work I would still like to watch those files for changes so I can trigger the compilation again.

I figured if I run this command with the beforeRun hook, it won't cause a recompile, but I think I have a misunderstanding of how this is working.

      {
        apply: compiler => {
          compiler.hooks.beforeRun.tap('RunMyPlugin', () => {
            exec('yarn run myCommand', (err, stdout, stderr) => {
              if (stdout) process.stdout.write(stdout);
              if (stderr) process.stderr.write(stderr);
            });
          });
        },
      },
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