Closed oarshad closed 4 months ago
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Which @angular/* package(s) are the source of the bug?
compiler-cli, compiler
Is this a regression?
Yes
Description
In Angular 18+ versions, the PostCSS configuration appears to execute twice during both development and production builds. This behavior can cause issues, particularly for users employing plugins such as postcss-rtlcss. In Angular 17 and earlier versions, this issue did not occur.
Steps to Reproduce:
Expected Behavior:
PostCSS should execute once, correctly applying the postcss-rtlcss plugin and preserving specific CSS comments for RTL processing (e.g., /!rtl:begin:ignore/).
Observed Behavior:
PostCSS runs twice:
Impact:
This issue causes CSS styles to be incorrectly processed, particularly in areas where ignore comments are used to maintain certain styles. The double processing results in unexpected changes to the CSS, breaking the intended styling for both LTR and RTL directions.
Request:
Please investigate and resolve the issue of PostCSS running twice in Angular 18+ to ensure consistent and expected CSS processing. This will help maintain compatibility with plugins like postcss-rtlcss and preserve the integrity of the styling configurations.
Please provide a link to a minimal reproduction of the bug
https://github.com/oarshad/angular-postcss-issue
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response