Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(angular): add tailwind support for buildable libraries #7961

Merged

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Dec 1, 2021

Current Behavior

When building a buildable library, Tailwind directives (e.g. @apply) are not processed because ng-packagr doesn't support Tailwind out of the box and it doesn't allow either to provide our own PostCSS configuration.

For more details see #6924 (comment).

Expected Behavior

Building a buildable library that uses Tailwind should correctly process any directive found in the stylesheets.

Given ng-packagr doesn't support Tailwind natively (as the @angular-devkit/build-angular:browser does) and it doesn't allow us to specify custom PostCSS config, we need to provide a different implementation that does support Tailwind natively. This provides a similar experience to Angular applications where Tailwind just works.

Related Issue(s)

Fixes #6924
Fixes #7965

@leosvelperez leosvelperez self-assigned this Dec 1, 2021
@vercel
Copy link

vercel bot commented Dec 1, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/DDuDgBCFjtz1v4L2jPTTZfE6NMQA
✅ Preview: https://nx-dev-git-fork-leosvelperez-tailwind-ng-buildable-c0228a-nrwl.vercel.app

Copy link
Contributor

@Coly010 Coly010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

@leosvelperez leosvelperez merged commit 9a08a83 into nrwl:master Dec 2, 2021
@leosvelperez leosvelperez deleted the tailwind-ng-buildable-libraries branch December 2, 2021 11:16
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants