Install & Explore JIT Compiler for Tailwind CSS in a simple project

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • 'JIT' mode is now included in Tailwind CSS directly. Watch • Install Tailwind CSS a... for the latest version installation.
    Tailwind Labs announced the release of an experimental JIT compiler for Tailwind CSS. In this video we’ll see what it is all about, how to install it with PostCSS for an existing project, and what are the new features that come with it.
    Referred blogpost: blog.tailwindc...
    Subscribe and stay tuned for tips, tutorials and more.
    Follow me on Twitter: / shrutibalasa
    Follow Thirus on Twitter: / thirusofficial
    Visit my website: www.shrutibala...
    #tailwindcss #tailwindJIT

КОМЕНТАРІ • 57

  • @tarequlhaque1139
    @tarequlhaque1139 3 роки тому +4

    This has been the clearest explanation so far not only on jit but how to get started with tailwind CSS. and only in a 14 min video! thanks! subscribed!

    • @Thirus
      @Thirus  3 роки тому

      Awesome! Thank you 😊 Do check out the other videos of Tailwind CSS in the playlist

  • @puneetsingh9678
    @puneetsingh9678 3 роки тому +2

    This is one of the best dev channels I've found this month. My goto place for tailwindcss related content.

    • @Thirus
      @Thirus  3 роки тому +1

      Awesome to know that! Thank you 😊

  • @mithileshmusic9310
    @mithileshmusic9310 3 місяці тому +1

    Thank you so much, I was struggling with the large rebuild times, this has helped me reduced the time to few ms. Thanks again

    • @Thirus
      @Thirus  3 місяці тому

      You’re welcome. Now JIT mode is default.

  • @simonswiss
    @simonswiss 3 роки тому +3

    Great stuff Shruti!

    • @Thirus
      @Thirus  3 роки тому

      Thank you Simon 😊

  • @amitavroydev
    @amitavroydev 3 роки тому +2

    Great video and great explanation. Dam with jit it has become so fast...

  • @amrrhaniff
    @amrrhaniff 3 роки тому +1

    omgg, big thanks for making this vid 🙌

    • @Thirus
      @Thirus  3 роки тому

      Big welcome 😊

  • @sonyarianto
    @sonyarianto 2 роки тому +1

    enjoy this tutorial, very clear since it explain the core advantage of JIT with super really simple example but easy to scale, thank you very much

    • @Thirus
      @Thirus  2 роки тому

      I’m really glad it helped :)

  • @rojonali3374
    @rojonali3374 3 роки тому +1

    Thank you so much. First video with jit setup. Waiting for Jit config with react. It will help lot.

    • @Thirus
      @Thirus  3 роки тому

      Will try that!

  • @swarasworld4439
    @swarasworld4439 3 роки тому +1

    Very well explained, keep sharing.

    • @Thirus
      @Thirus  3 роки тому

      Thank you 😊

  • @joshuachris1419
    @joshuachris1419 2 роки тому +1

    Great!

  • @alexandermercyadeiza1796
    @alexandermercyadeiza1796 2 роки тому +2

    If you run into npm run build error after installing @tailwindcss/jit note below:
    Tailwind has updated 'jit', no need to have '@tailwindcss/jit' in your postcss file. Just include mode: 'jit' in your tailwind.config.js.
    That should fix it, cheers

  • @opinionLeader322
    @opinionLeader322 3 роки тому +1

    ty for tutorial. you can install the vscode extension "PostCSS Language Support" to remove the underlines for @tailwind in tailwind.css

    • @Thirus
      @Thirus  3 роки тому

      Thanks for that

  • @timothykinuthia3817
    @timothykinuthia3817 3 роки тому +1

    thanks, JIT is cool and i like it

  • @anuj7286
    @anuj7286 3 роки тому +2

    Can we use this JIT compiler in any large or small scale projects? Btw thanks for the tutorial

    • @Thirus
      @Thirus  3 роки тому +1

      Yes, definitely. The Jit mode is now directly available in Tailwind latest version. Do check the docs and use it that way

    • @anuj7286
      @anuj7286 3 роки тому +1

      @@Thirus okay thank you so much!

  • @cesarrotela
    @cesarrotela 3 роки тому +2

    Thanks for this video! it helped me a lot! a question ... how can I minify the styles.css file with a command in my package.json file?

    • @lutzgerken9634
      @lutzgerken9634 3 роки тому +1

      I have the same question.

    • @Thirus
      @Thirus  3 роки тому

      You should be able to do it using ‘cssnano’ package.
      Check this for detailed explanation - github.com/tailwindlabs/tailwindcss/discussions/2819#discussioncomment-134820

  • @shayakdey6787
    @shayakdey6787 3 роки тому +1

    I exactly did what you're doing but after I run the 'build' script i see lots of classes in css file which I didn't use... I don't know how to remove them.... Plzz reply

    • @Thirus
      @Thirus  3 роки тому

      Try running it again. They should be gone

  • @lucasyang7726
    @lucasyang7726 3 роки тому +1

    素晴らしい

  • @tanzimibthesam5861
    @tanzimibthesam5861 3 роки тому +1

    I cant get the border working can you check the issue thanks. It works with CDN maybe a bug

    • @Thirus
      @Thirus  3 роки тому

      Can you share a screenshot? (On Twitter may be)

    • @tanzimibthesam5861
      @tanzimibthesam5861 3 роки тому +1

      @@Thirus ok on twitter hopefully

  • @shayakdey6787
    @shayakdey6787 3 роки тому +1

    Can you make a video how to use tailwind css with sass then we don't have to put same class over & over again?

    • @Thirus
      @Thirus  3 роки тому

      Why sass? You can use the “apply” directive to extract classes

    • @shayakdey6787
      @shayakdey6787 3 роки тому

      @@Thirus because we can make our own reusable components for future use....

  • @maksymdudyk1718
    @maksymdudyk1718 3 роки тому +1

    Most of people have their projects built on top of Webpack. How to integrate this great Jit/Tailwind instrument into it? Is Jit compiler compatible with Webpack at all?

    • @Thirus
      @Thirus  3 роки тому

      Yes, it is compatible. It mostly works the same way. Need to replace “tailwindcss” with “@tailwindcss/jit” and it should work I’m guessing

    • @maksymdudyk1718
      @maksymdudyk1718 3 роки тому +1

      @@Thirus Thirus, you are wonderful. Thank you!

  • @md.siddiq7165
    @md.siddiq7165 3 роки тому +1

    Thanks for the video. But there is a issue that I'm facing. Say, I have added a p-2 class. The related styles then gets added to the file. but if I change my mind and remove that class, the watch script watches it but doesn't instantly removes it from that file. I have to rerun "npm run build". I hope you understand what I am trying to say

    • @Thirus
      @Thirus  3 роки тому

      Yes it will be there until you build again, just in case you decide to add it back.

    • @md.siddiq7165
      @md.siddiq7165 3 роки тому +1

      @@Thirus Thanks for the reply

  • @davidjforer
    @davidjforer 3 роки тому +1

    Have you tried this with React? Is it different to install?

    • @Thirus
      @Thirus  3 роки тому +1

      Haven’t tried, but it’s similar set of steps. Adam Wathan shows JIT with React in his demo video - ua-cam.com/video/3O_3X7InOw8/v-deo.html

    • @davidjforer
      @davidjforer 3 роки тому +1

      @@Thirus He uses next in the video unless I missed something. I tried create-react-app but couldn't get it to work. It needs postcss 8 I think and we have to use 7. Got a little confusing. Might be a good video to use it? Anyway thanks and nice video

    • @Thirus
      @Thirus  3 роки тому

      Oh is it? I’m not a React developer, but I’ll try and get back

  • @shayakdey6787
    @shayakdey6787 3 роки тому

    The build script is not not working

    • @Thirus
      @Thirus  3 роки тому

      What’s the error?

    • @shayakdey6787
      @shayakdey6787 3 роки тому

      @@Thirus cannot read property 'theme' of undefined

    • @kokuga9117
      @kokuga9117 3 роки тому

      try to keep tailwindcss instead of '@tailwindcss/jit' in postcss.config.js

    • @shayakdey6787
      @shayakdey6787 3 роки тому

      @@kokuga9117 then how i can use jit feature?