New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack compiling twice on startup when importing a file within a typescript react setup #14768
Comments
I think this is related to #14735. The invalidation comes from
This indicated that watchpack.watch is called with these invalid file entries. When encountering these paths, it then tries to adds watchers for these files, fails (because they dont exist |
I think it has nothing with TS. My JS repo has the same issue and it compile 3 times. |
@wood1986 I switched to webpack v5.64.0 and I still get the double compilation. With the repo above you can test it out. Agree that it has nothing to do with TS. The webpack config is not using TS for anything. I just mentioned it since I was setting up a new project. |
Yep, it is bug |
@bahtou |
@alexander-akait I just cloned the repo and updated the webpack package to 5.64.0.
UPDATE
|
Yep... |
should be fixed by https://github.com/webpack/webpack/releases/tag/v5.64.2 |
Bug report
What is the current behavior?
Working on a TypeScript React project when running webpack the compilation happens twice at startup. This happens when a file is being imported from the root react
index.tsx
.Not sure if its similar to #13618?
If the current behavior is a bug, please provide the steps to reproduce.
you should be able to see two rebuilds
What is the expected behavior?
compilation should only run once
Other relevant information:
webpack version: 5.64.1
Node.js version: v14.18.1
Operating System: OSX
Additional tools: none
The text was updated successfully, but these errors were encountered: