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

Tailwindcss with single-spa parcel #1015

Closed
jdgabriel opened this issue Jul 6, 2022 · 1 comment
Closed

Tailwindcss with single-spa parcel #1015

jdgabriel opened this issue Jul 6, 2022 · 1 comment

Comments

@jdgabriel
Copy link

Describe the bug or question
How to use Tailwindcss with single-spa, and single-spa parcel?

To Reproduce
Install Tailwind from "Get Started" from web

Expected behavior
Css builded from tailwind modify interface web

Screenshots and/or console output
image

@filoxo
Copy link
Contributor

filoxo commented Aug 24, 2022

Tailwind removes "unused classes" at build time which poses a problem for microfrontends because those aren't local https://tailwindcss.com/docs/content-configuration#safelisting-classes

So your options are:

  • generate a stylesheet that contains all the classes you want to keep and load it like you would any other stylesheet
  • use an on-demand css generator like https://twind.dev/ and expose it as a utility module/shared dependency to generate tailwind classes at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants