-
Notifications
You must be signed in to change notification settings - Fork 188
Infinite loop with nuxt-bridge and tailwindcss-module@5.0.2 #448
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
When I run the repository provided above on Windows, I get a compiling loop. I tried fully overwriting the content: () => { // fully overwrite using a function
return [
"./components/**/*.{js,vue,ts}",
"./layouts/**/*.vue",
"./pages/**/*.vue",
"./plugins/**/*.{js,ts}",
"./nuxt.config.js", // .{js,ts} -> .js
"./tailwind.config.js", // .{js,ts} -> .js
];
}, I hope this helps with workarounds and problem-solving. |
We also have this problem and watching this issue with great interest 😃 |
@avanderhoek does solution provided by @moochannel work for you? I get an error on both windows and linux Windows:
Linux
P.S. Nuxt team is working hard on |
There are two options that worked for me. General steps for B:
OR
you have to specify the extension, DON'T USE:
|
Nothing works for me. I get stuck on the infinite loop no matter what I try |
Hi all, Just an FYI that I also ran into this issue, running nuxt bridge and the latest version of this module, as of today (v5.3.2) I followed the instructions provided by @michasik in his comment #448 (comment) and it has resolved the reported issue for me. Obviously a workaround, bur thanks very much @michasik |
Echoing what others have found, this suggestion seems to point at the nuxt config {js,ts} being the issue: #449 (comment) I've also dropped this module in favour of a direct install of tailwind and that's resolved the issue. |
@michasik's recommendation works but it might get out of date, it's mostly the same as the official tailwind recommendation: https://tailwindcss.com/docs/guides/nuxtjs with the change of using This 'native' setup is also a lot faster for development than using |
Best way for Nuxt 2 is to use it without module if you hit an issue yes |
Just FYI, the reason this module doesn't work with nuxt 2 is because of this: #359 (comment) (TLDR it's causing the whole ${srcDir} including .nuxt to be watched) I was able to remove the following from the tailwind config:
And it totally fixed the issue. So this is just an FYI in case anyone wanted to know the underlying reason why 'nuxt.config.{ts,js}' in the tailwind config will cause infinite hmr loop. |
Version
@nuxtjs/tailwindcss: 5.0.2
nuxt: nuxt-edge@latest
Reproduction Link
https://github.com/m4sny/nuxt-bridge-tailwind
Steps to reproduce
git clone https://github.com/m4sny/nuxt-bridge-tailwind
yarn install
yarn dev
What is Expected?
It should work without loop
What is actually happening?
After you type the command, the loop begins. I tested on two systems ( Linux and Windows) and I get different results.
On Linux it compiles correctly (screenshot below), the page looks like it works on localhost:3000, but there is this unfortunate compilation loop that starts every 100s on average

On Windows it completely crashes. localhost:3000 doesn't work and the terminal runs like crazy (gif and log below)
GIF: https://gyazo.com/1c6dd1e4f8eb3c6cbe501694c7f4a68d
yarn dev log
The text was updated successfully, but these errors were encountered: