-
Notifications
You must be signed in to change notification settings - Fork 8
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 compile twice when js file changed #1
Comments
Hi, sorry for late, found this issue just now :) I'll try to do something with it |
I'll try to figure out the problem: Seems like it's not possible to solve this problem by only loader, according to loader api you can not prevent already started compilation. But, I think this is where we can create plugin, that prevents second compilation. Need more time to solve this problem. |
Thank you for spending time investigate it. I am actually totally happy to have it compiled twice. Seeing multiple green 'success' displayed on screen makes me feel that my code is rock solid :) |
Webpack team add new documentation on loaders api, so it seems like I'll take a look in next few days |
How the research is going ? Really looking forward it :) Amazing loader btw, saved me a lot of headaches with pre commit setup inside Docker 👍 |
Sorry for delay, I could not find a lot of time for solving this problem before. But I have time on next week, so I think somehow this will be done. |
Hi ! How is it going ? Looking forward it 😄 |
Hi, sorry for so late, it's done in watch-mode-fix branch, but I want to be sure with this, and I would like to take just a couple of days for more testing before merge it to master |
@iamolegga hi, will you merge the fix? Maybe publish beta version with the fix to npm? |
@Deadly0 I tested this, but had some issues with webpack 4, so that's why I didn't merge it yet. Now I'm on vacation, and I have not access to npm, so more time is required |
@iamolegga any luck with this? |
Any solution for this? |
Hi everyone, first of all, I'm so sorry for making you waiting so much time for solving this. Last 2-3 days I was working only on this problem trying to solve this old bug. I've read all the webpack API docs, I've tried different ways, but no luck. With current webpack API it seems like it's not solvable. More over webpack maintainers saying that loaders should not do things like this loader does (webpack/webpack#9763) 🤷♂️ I've looked at other similat projects, but no one has solution. So I'm going to add this as knowing issue in docs, and closing it for now. Sorry |
Anyone found a good alternative to this? |
Hi,
When I changed a js file, the webpack dev server run the process twice. Do you know how to prevent this?
my config is like:
webpack output this:
The text was updated successfully, but these errors were encountered: