Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

84
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!