-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Looping recompile with version 4 using laravel Mix #16151
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
Comments
I also am having this issue with Tailwind v4 and haven't found a work around for it just yet, I'd love to know if there's been any solutions discovered? |
My solution was to just use "mix" instead of watching but it became to much of a PITA doing it manually after every edit so i just reverted back to v3 for now. |
I might have a solution for you - adding
to your webpack.mix.js may resolve the looping - I have found that there is a possibility that the manifest json is being updated and that change is detected causing a loop |
I actually tried this previously and didn't fix it. Did it this fix it for you? |
For me this has seemed to resolve the issue, although I asked a friend and the code that I had without ignoring the manifest json actually worked on his machine, so I really don't know if there's something in my specific environment thats causing issues |
Hey! Did this work in v3 with you? It would really help if you could set up a reproduction in a small repository that I can check out and run locally. However from a first glance this does involve quite a lot of configuration and webpack specific so I'm not sure we can help out a ton here. |
Hey Phillip! I can set up a demo repository for what causes my looping - the same workflow I use for v3 does not cause this issue. My looping issue came from a much more simple/basic webpack setup that you can take a lot at, although I am unsure if you would be able to reproduce the problem - as I mentioned above, another developer used a zipped up demo project and could not get Laravel Mix to loop, but I can still create a repo if it helps you out! (or I can create a separate issue, since there is a lot more detail and config in the original post) |
I'm also encountering this issue. @dalton-f are you also on a Mac Apple M1, and was the other developer using a Mac as well? |
No, both developers were using WIndows. I don't think the OS should have any affect if webpack is detecting some random file change, did you try to ignore the mix-manifest.json? |
Ah ok! Asked about OS considering your question regarding environment. But, I did try to ignore mix-manifest.json, and even went as far adding |
That is strange - it seems we all have very similar problems for slightly different reasons, you could try ignoring the folder where your CSS is being compiled to, but other than that I have no clue why webpack is detecting changes |
this help me
|
Revisited this and it does actaully solve it, I was mistyping manifest. Thank you!! |
Same issue here, |
Same issue. For me, ignored-fix is not working either. |
Thank you, this did the trick and it works like a charm now! Magic! :) |
Looks like the issue is resolved for the OP so going to close this one, but if anyone else is still having issues please open a new issue and include an actual reproduction, otherwise we can't reasonably investigate it 🙏🏻 |
FWIW, in my setup (Laravel project) I had to ignore the mix.webpackConfig({
watchOptions: {
ignored: [
'**/public/**',
'**/mix-manifest.json',
],
},
}); |
When I run "mix watch" it will cause a looping recompile. I am unsure if the issue is with Mix or Tailwind because there's not much info other than a successful compile. I've tried adding ignore paths and different options but always results in a loop. Below is my current file structure. Not sure if there's some other option I need now with version 4 that I may be missing.
style.scss
@use "tailwindcss";
tailwind.config.js
postcss.config.js
webpack.mix.js
The text was updated successfully, but these errors were encountered: