Skip to content

JIT stops compiling on error in imported files when watching #4904

@andershagbard

Description

@andershagbard

What version of Tailwind CSS are you using?

2.2.4

What build tool (or framework if it abstracts the build tool) are you using?

webpack 5

What version of Node.js are you using?

14.16.1

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction repository

https://github.com/andershagbard/tailwind-error

Describe your issue

This is a little complex, and I may get things wrong. This is my understanding of the problem by debugging.

My error is when I run yarn watch (webpack --mode development --watch --progress)

When I make an error in the file, e.g. forgetting to close a class. The compiler then returns and error. I correct this error and it recompiles.

When I make an error in @apply. This could be adding a background which doesn't exists, it returns an error as expected, but when I correct the error, it does not recompile. I have to restart the watch command to get it running again.

  • This error only happens when I have imported a CSS file. E.g. scaffolding.css
  • This error doesn't happen when i remove tailwindcss/nesting from postcss.config.js

I hope this information is enough to debug this further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions