Tailwind @screen Directive does not work with Application builder but previously worked with Webpack builder #26709
Labels
angular/build:application
area: @angular-devkit/build-angular
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Command
build, serve
Is this a regression?
The previous version in which this bug was not present was
No response
Description
I create a new issue based on my previous one #26644 (comment) since it's a different topic now.
I've reproduced the issue successfully with the old, but still valid directive
@screen
(even if not documented). If this isn't supposed to work the ESBuild, then I wonder what the upgrade path (from@screen
to@media screen (xy)
) would be. It seems like nothing is mentioned anywhere?See https://github.com/mirobo/nx-angular-tailwind/tree/main and (maybe you need to run
npm install
it with legacy peer deps). Thennpm run start
(it starts both variants).Resize the window to see colors of the h1 with "TAILWIND SCREENS TEST" change (the variant with ESBuild won't work)
I see that both executors do something with postcss and autoprefixer internally (which are both added as dependencies in this test project), but only the Webpack executor seems to have a "sass-loader" webpack/configs/styles.ts while in esbuild..sass-language.ts and esbuild..stylesheet-plugin-factory.ts I didn't find it.
The styles.css produced by both bundlers is pretty much identical: https://github.com/mirobo/nx-angular-tailwind/tree/main/style-css-output
In the generated main.js I see that some processing was not done:
ESBuild
Webpack
Minimal Reproduction
npm install
(maybe run it with legacy peer deps).npm run start
(it starts both variants, one with Application builder and one with Webpack).TAILWIND SCREENS TEST
changes color (in case of Webpack) and how it doesn't change color (in case of Application/ESBuild builder)Exception or Error
No response
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: