question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support tailwindlabs/tailwindcss-jit

See original GitHub issue

Is it planned to generate minimal css with the new tailwindlabs/tailwindcss-jit instead of purging from the traditional huge set of Tailwind classes?

In my use case the files generated by Maizzle become templates consumed by another templating system (.eex / Elixir). As those .eex templates should be up to date during development on each edit, I do a maizzle build production of all templates on each save. For this use case it would be relevant to improve the build times with tailwindlabs/tailwindcss-jit.

I would be happy to contribute with a PR if you have a hint where to start.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
cossssmincommented, Apr 16, 2021

Using Tailwind’s own purging has now been implemented in #432, and we’ll soon publish a new release.

Remember, to use JIT you will (currently) need to:

  1. enable it only for maizzle serve or maizzle build (and not for any other environment, because of https://github.com/tailwindlabs/tailwindcss/issues/4071)
  2. also specify the purge option in your tailwind.config.js, in simplified array syntax (it throws an error and Maizzle build hangs if you omit it or set it to an object, see https://github.com/tailwindlabs/tailwindcss/issues/4094)

Example:

module.exports = {
  mode: process.env.NODE_ENV === 'local' ? 'jit' : 'aot', // all `maizzle build` commands that specify an environment name will use 'aot'
  purge: [
    'src/**/*.*',
  ],
  // ...
}
2reactions
cossssmincommented, Apr 6, 2021

Yes we’ll definitely add support for it, just need a bit more time to make sure we don’t break anything and that it works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Just-in-Time Mode - Tailwind CSS
Tailwind CSS v2.1 introduces a new just-in-time compiler for Tailwind CSS that generates your styles on-demand as you author your templates instead of ......
Read more >
tailwindlabs/tailwindcss-jit - GitHub
An experimental just-in-time compiler for Tailwind CSS that generates your styles on-demand as you author your templates instead of generating everything in ...
Read more >
Everything you need to know about Tailwind CSS JIT Compiler
It's an experimental just-in-time compiler for Tailwind CSS that generates your styles on-demand as you author your templates.
Read more >
@tailwindcss/jit - npm
An experimental library that generates CSS with the same API you already know from Tailwind CSS, but on-demand as you author your template...
Read more >
Tailwind CSS JIT - support - HUGO
Is anyone using this yet? I'm trying to get it to work, but running into issues. baseof.html {{ $styles := resources.Get “css/tailwind.css” ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found