Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bug: Tailwind@4 prevents style changes to @use scss styles #30434

Closed as not planned
@IsaacSomething

Description

@IsaacSomething

Which @angular/* package(s) are the source of the bug?

compiler, Don't known / other

Is this a regression?

Yes

Description

Updating to tailwind@4 refactors tailwind using .postcssrc.json with @use "tailwindcss"; (changed to use @use based on the cli warning) in the root style.scss

Adding @use "tailwindcss"; to the styles.scss file will break watch changes with imported .scss files

Broken style changes with HMR:

@use "tailwindcss";
@use './styles/helpers/imports-helpers';
@use './styles/theme/imports-theme';
@use './styles/libraries/imports-libraries';
@use './styles/material/imports-material';

Working style changes with HMR:

@use './styles/helpers/imports-helpers';
@use './styles/theme/imports-theme';
@use './styles/libraries/imports-libraries';
@use './styles/material/imports-material';

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-grnreme3?file=src%2Fglobal_styles.scss

Please provide the exception or error you saw

There is no error it just displays 
"No output file changes" 
in the terminal after adding `@use 'tailwindcss'` when changing styles in scss files

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 19.2.14
Node: 22.13.0
Package Manager: npm 11.3.0
OS: win32 x64

Angular: 19.2.14
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker

Anything else?

The files will update if i specifically go into the styles.scss file make a small change (add a line break) and then save. This then triggers the change made in the child .scss and the update is visible in the browser

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