question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

webpack watch mode rebuild twice on file change [MacOS]

See original GitHub issue

Bug report

Minimal repro: https://github.com/Bnaya/webpack5-twice-compile-why

What is the current behavior? Run the project https://github.com/Bnaya/webpack5-twice-compile-why on a mac machine (yarn && yarn start) After the initial compile, open src/index.js and hit save.

You will see that webpack rebuild the project twice.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Other relevant information: webpack version: 5.69.1 webpack-cli: 4.9.2 Node.js version: (14, 16) Operating System: macos 12.2.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:40 (35 by maintainers)

github_iconTop GitHub Comments

6reactions
alexander-akaitcommented, Feb 22, 2022

Because it is bug?

2reactions
Bnayacommented, May 17, 2022

Thank you @markjm!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Watch and WatchOptions | webpack
Webpack can watch files and recompile whenever they change. This page explains how to enable this and a couple of tweaks you can...
Read more >
webpack --watch isn't compiling changed files - Stack Overflow
An easy solution on MacOS is the following : Open two terminal windows in the same directory that your project resides ...
Read more >
File Watchers | IntelliJ IDEA Documentation - JetBrains
File Watcher is an IntelliJ IDEA tool that allows you to automatically run a command-line tool like compilers, formatters, or linters when ...
Read more >
atlassian / atlassian-clientside-extensions / Pull Request #775 ...
Performance. Improve memory usage and performance of aggregating needed files/directories for watching. This affects rebuild performance ...
Read more >
Creating a React-based Electron application with ... - Medium
We need to use a middleware that can watch for file changes and rebuild the Electron app accordingly as well as refresh the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found