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

Make Hugo work with tailwindcss-jit #8343

Closed
bep opened this issue Mar 18, 2021 · 51 comments
Closed

Make Hugo work with tailwindcss-jit #8343

bep opened this issue Mar 18, 2021 · 51 comments
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Mar 18, 2021

https://github.com/tailwindlabs/tailwindcss-jit

@bep bep added the Proposal label Mar 18, 2021
@bep bep self-assigned this Mar 18, 2021
@bep bep added Enhancement and removed Proposal labels Mar 18, 2021
@bep bep added this to the v0.82 milestone Mar 18, 2021
bep added a commit to bep/hugo that referenced this issue Mar 18, 2021
@bep bep modified the milestones: v0.82, v0.83 Mar 21, 2021
@bep bep modified the milestones: v0.83, v0.84 May 1, 2021
@supjs
Copy link

supjs commented Jun 14, 2021

Would be nice if this could be added sometime soon. I think the JIT really improves the PostCSS / Tailwind workflow and speeds it up quite significantly.

@bep bep modified the milestones: v0.84, v0.85 Jun 18, 2021
@bep bep modified the milestones: v0.85, v0.86 Jul 5, 2021
@metmac
Copy link

metmac commented Jul 12, 2021

Using @praveenjuge's workaround for now, but definitely stoked to see this come to Hugo.

@sid-r-singh
Copy link

sid-r-singh commented Jul 14, 2021

Using @praveenjuge's workaround for now, but definitely stoked to see this come to Hugo.

I am also using this workaround. Let's hope to see the integration in Hugo soon.

@bep bep modified the milestones: v0.86, v0.87, v0.88 Jul 26, 2021
@bep bep modified the milestones: v0.88, v0.89 Sep 2, 2021
@mikewatkinsca
Copy link

Noting that Tailwind 3.0 alpha has landed and JIT mode has replaced the classic engine; given few breaking changes (other than this one) expect Tailwind 3 will hit release within a couple of months. FYI

Tailwind 3.0.0 alpha 1 release

@bep bep modified the milestones: v0.89, v0.90 Nov 2, 2021
@brycewray
Copy link

Noting that Tailwind 3.0 alpha has landed and JIT mode has replaced the classic engine; given few breaking changes (other than this one) expect Tailwind 3 will hit release within a couple of months. FYI

Tailwind 3.0.0 alpha 1 release

Now released:
https://tailwindcss.com/blog/tailwindcss-v3

@fywk
Copy link

fywk commented Dec 10, 2021

Now released: https://tailwindcss.com/blog/tailwindcss-v3

Hi @brycewray, I've followed your guide on your blog to get JIT working. I couldn't get my site to build after upgrading to v3. I've altered npm scripts to get local server with watch mode working but no luck on building for production yet.

@bep bep added this to the v0.108.0 milestone Dec 3, 2022
@bep bep modified the milestones: v0.108.0, v0.109.0 Dec 14, 2022
@bep bep modified the milestones: v0.109.0, v0.111.0, v0.110.0 Jan 26, 2023
@bep bep modified the milestones: v0.111.0, v0.112.0 Feb 15, 2023
@bep bep modified the milestones: v0.112.0, v0.113.0 Apr 15, 2023
@ahaltindis
Copy link

Probably not very Hugo way but I am using tailwindcss CLI which keeps me away from Node.js/npm. Even though it has more pieces to put together, seems a bit more straightforward.

I have this simple bash script which runs hugo server and tailwindcss watcher together:

#!/bin/bash

$(cd themes/{theme} && tailwindcss -i assets/css/input.css -o assets/css/output.css --watch) &

hugo server 

For production, hooking tailwindcli before hugo build command.

@istr
Copy link

istr commented Jun 1, 2023

@bep I think that this could now be closed, as it is implemented in 0.112.*?

The documentation explicitly states that

The build.cachebusters configuration option was added to support development using Tailwind 3.x’s JIT compiler

https://gohugo.io/getting-started/configuration/#configure-cache-busters

The reference implementation works like a charm:
https://github.com/bep/hugo-starter-tailwind-basic

Or did I miss something that is still WIP?

@bep bep modified the milestones: v0.113.0, v0.115.0 Jun 13, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@earthboundkid
Copy link
Contributor

This issue should have been closed when Hugo 112 released.

@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep
Copy link
Member Author

bep commented Aug 30, 2023

Closing, this is fixed (and actually works very well after a few tweaks).

@bep bep closed this as completed Aug 30, 2023
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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

Successfully merging a pull request may close this issue.