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

Fixbuild #1

Closed
wants to merge 2 commits into from
Closed

Fixbuild #1

wants to merge 2 commits into from

Conversation

txfs19260817
Copy link

Hi, thanks for your great Lit-Tailwind integration solution!

I found that it won't apply Tailwind styles in built web app. That's because Vite doesn't help compile ../styles/main.css when building. Thus, only the base64 encoded @import url(./tailwind.css);@import url(./global.css); stays in the <head>, which is definitely not working.

According to this doc, I found that the only way to build this css file is to import it as a module. In this way, the compiled css can be appended in .

@Mafrans
Copy link
Owner

Mafrans commented Feb 26, 2022

Including all tailwind styles as an inline style in every component could cause performance issues that a link would not due to browser caching. I think a better solution would be to have the link target a bundled css document when built with rollup.

@Mafrans
Copy link
Owner

Mafrans commented Apr 6, 2022

Solved by #3

@Mafrans Mafrans closed this Apr 6, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants