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

Enable JIT support #4

Closed
maddog986 opened this issue Sep 14, 2021 · 7 comments
Closed

Enable JIT support #4

maddog986 opened this issue Sep 14, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@maddog986
Copy link

Describe your Idea
JIT support would be nice. Having the ability to use peer-* on components opens a ton more possibilities for components.

Additional context
I built a simple carousel component, but can not submit due to it using peer-* styling. See it at https://play.tailwindcss.com/bzje1DhMN5

@maddog986 maddog986 added the enhancement New feature or request label Sep 14, 2021
@agustinprod
Copy link

It's actually a nice thing to have, because we're loading the full tailwindcss for each component, a few mb worth of css... We should generate a tailwind css compilation on real time by compiling on the browser, but i don't know if that is possible.

@maddog986
Copy link
Author

maddog986 commented Sep 15, 2021

It's actually a nice thing to have, because we're loading the full tailwindcss for each component, a few mb worth of css... We should generate a tailwind css compilation on real time by compiling on the browser, but i don't know if that is possible.

Would this work? https://github.com/beyondcode/tailwindcss-jit-cdn

edit: Appears to work for me, testing locally, with a simple html file and the included script tag.
edit: edit: Working demo, with Tailwind JIT: https://codesandbox.io/s/infallible-wing-nqsjx?file=/index.html

@agustinprod
Copy link

It looks exactly what we need, thank you! Maybe we should only enable this for components on version >= 2.0. What do you think @khatabwedaa ?

@khatabwedaa
Copy link
Contributor

Let take look 👀 .

@maddog986
Copy link
Author

Just now I guess we can just add the script tag to the component page, it works: https://tailwindcomponents.com/component/card-carousel

@khatabwedaa
Copy link
Contributor

Awesome I will apply it for all v2 components Thanks Budy.

@khatabwedaa
Copy link
Contributor

khatabwedaa commented Sep 20, 2021

Hey @maddog986, we added to the code base now you can use jit without including any script.

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

No branches or pull requests

3 participants