Skip to content

[v4] Ignore certain paths from scanning no longer supported #15943

Closed
@CicerBro

Description

@CicerBro

What version of Tailwind CSS are you using?

v4.0.0

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

Vite 6

What version of Node.js are you using?

22.13

Describe your issue

In v3 one could add a line with an exclamation mark ! prefix in the tailwind.config.js to exclude certain files or paths from being scanned:

    content: [
        './resources/views/**/*.blade.php',
        '!./resources/views/somefoldername/*',
    ],

but that option seems to have vanished in v4. I know I can do @import 'tailwindcss' source(none); and then @source '../../../resources/views'; which works but there is no way to exclude a subfolder from that path.

One work around is to add all the subfolders by hand, but that's a bit of a PITA when the project grows and you forget you need to add every view subfolder to the config css now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions