Is there any way to disable JIT in tailwind 3.0 #6347
-
Firstly, congratulation for the 3.0 release. I understand the great benefit the JIT bring to the table. However, for my case, my workflow are usually try to add, remove, adjust utility classes in Browser Dev tool to see what's best, before coming back to code editor to make that change. With JIT, it cannot be done because I have to make change in code editor first, then the engine compile the new CSS file, then I have to hit Ctrl+F5 (to make sure the browser doesn't load the cached css version) and see the result. I cannot interate with difference options directly in browser dev tool and see the visual result changed immediately, except for those classes that has already been used somewhere in my project. Is there any way to just make the old-style development version (around 4MB) which contain all the classess for the development stage? |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 11 replies
-
About disabling JIT in tailwind 3.0: UpdateIf you just want to Try and Play Around with Tailwind CSS without having to install anything locally:
Are good Options. Also if you want all the benefits of the Local Install(Installing NPM Packages) and using any Front End framework(React, Vue, Next, Nuxt etc) but still in the browser: |
Beta Was this translation helpful? Give feedback.
-
You could use the tailwind CDN for this! |
Beta Was this translation helpful? Give feedback.
-
Thank you. It's a great solution |
Beta Was this translation helpful? Give feedback.
-
I'm trying to disable as well, Tailwind is not styling on NextJS 12, on my current work enviornment , and I get no errors to notify me what's wrong. Although it did style on a new app |
Beta Was this translation helpful? Give feedback.
-
I would also like to have all usual classes for this one, a pre-compiled tailwindcss with the usual: #6555 |
Beta Was this translation helpful? Give feedback.
-
Even tho a lot of better solutions have been proposed I wanted to share a hacky way of getting all the css classes.
|
Beta Was this translation helpful? Give feedback.
-
@kla-trackunit , thank you very much for your tip! It's a shame there is no straightforward way to play around with different classes as this was one of the best Tailwind's features. In order to generate all classes for development only this code can be used: module.exports = {
<other_options>
...(process.env.NODE_ENV == 'development') && {
safelist: [
{ pattern: /.*/ },
],
},
} |
Beta Was this translation helpful? Give feedback.
-
You can also check out our Devtools for Tailwind chrome extension, which gives you the full power of JIT right in your devtools |
Beta Was this translation helpful? Give feedback.
-
I'm using tailwind with vite and i'm trying to build my table layout based on some data i'm getting from with data response -> column width (eg- w-1/6) and adding that class programatically on table building className= |
Beta Was this translation helpful? Give feedback.
-
Just want to chime in here - we're using Tailwind for app development, and want everything generated because it's being served locally from the device. That being said, a large TW css file isn't a problem. It allows us to supply styled components via an API for dynamic content. It would be great if there was a way to just say "generate everything" - and then have an exclusion list from there. |
Beta Was this translation helpful? Give feedback.
-
I also want to chime in, whilst the JIT compiler does allow some cool new features, I think there are plenty of use cases where people would prefer not to purge in dev. I personally have a custom kotlinjs framework that takes quite a long time to restart the server and if I want styles that weren't in there before I have to do a clean build and can't do hot reloading. This makes using tailwind 3 a really bad experience. Thanks to the answer by @kla-trackunit which I think will be plenty good enough for my use case but it seems the tailwind developers do not realise that not everybody is using the popular javascript frameworks. More and more people are using other languages that compile to javascript and different types of frameworks and completely removing |
Beta Was this translation helpful? Give feedback.
-
I'm really needing a plain old pre-compiled .css file (like back in the 2.0 days) for my particular usecase. |
Beta Was this translation helpful? Give feedback.
About disabling JIT in tailwind 3.0:
Check @adamwathan reply Here: https://github.com/tailwindlabs/tailwindcss/discussions/6256
Update
If you just want to Try and Play Around with Tailwind CSS without having to install anything locally:
Are good Options.
Also if you want all the benefits of the Local Install(Installing NPM Packages) and using any Front End framework(React, Vue, Next, Nuxt etc) but still in the browser:
3. https://stackblitz.com (*Not related to Tailwind CSS) is another option.