这是indexloc提供的服务,不要输入任何密码
Skip to content

v2.5.6 to 2.5.7-canary.0 causes NextJS HMR to infinite loop #10914

@adriano-tirloni

Description

@adriano-tirloni

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

.

Which canary version will you have in your reproduction?

2.5.7-canary.0

Environment information

"dev": {
      "cache": false,
      "persistent": true
 }

it a simple start of nextjs dev server

Expected behavior

no infinite loop compilation

Actual behavior

Image

I was able to find the cause, and narrow it down as much as I could.
Actually what was happening is that a .css with tailwind in a package was targeting as a @source the all the .tsx files recursively inside the apps folder: @source "../../../../apps/**/*.{ts, tsx, js, jsx}";

I narrowed it down to the .turbo folder, if you use a wildcard glob like this: @source "../../../../apps/nextjs-site/.turbo/*.asdasd" it will trigger this infinite compilation loop, maybe there is some symlink stuff going on because the folder only has a .log file, I don't know.

I changed my code so that @source targets only apps source code, but anyway this behaviour was introduced from v2.5.6 to 2.5.7-canary.0 it was not happening before.

To Reproduce

Create a monorepo with /apps and /packages structure, create a .css file with tailwind with the @source directive targeting the .turbo folder with a wildcard.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions