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

Tailwind asset building results in error #888

Open
bicarlsen opened this issue Oct 21, 2024 · 6 comments
Open

Tailwind asset building results in error #888

bicarlsen opened this issue Oct 21, 2024 · 6 comments

Comments

@bicarlsen
Copy link
Contributor

When including Tailwind assets, the CSS is not processed correctly. I believe this is because tailwind indicates you need to run the tailwind compiler via npx (see step 5 of link). However, Trunk runs the executable directly.

I tested this on Windows.

@ctron
Copy link
Collaborator

ctron commented Oct 21, 2024

Hm, I know too little about that. However, I don't think that has ever changed in trunk.

@bicarlsen
Copy link
Contributor Author

Is it worth digging into?

The workaround I currently use is to run a pre_build hook npx tailwindcss -i main.css -o out.css then include out.css as a style sheet with <link data-trunk rel="css" href="out.css" />.

@ctron
Copy link
Collaborator

ctron commented Oct 25, 2024

I honestly don't know. If you have the time fixing this, it would be great I guess. I personally don't use it.

@ctron
Copy link
Collaborator

ctron commented Oct 28, 2024

Is this maybe related to #897?

@bicarlsen
Copy link
Contributor Author

Is this maybe related to #897?

Hard to tell, I couldn't understand the details of #897. Hopefully they can clarify.

@Rizary
Copy link

Rizary commented Oct 30, 2024

Is it worth digging into?

The workaround I currently use is to run a pre_build hook npx tailwindcss -i main.css -o out.css then include out.css as a style sheet with <link data-trunk rel="css" href="out.css" />.

I happened to stuck in this... can you give me example on how your pre_build hook looks like?

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

3 participants