Tailwindcss-module: Just-in-time compiler support

Created on 15 Mar 2021  路  3Comments  路  Source: nuxt-community/tailwindcss-module

This was just released:

https://youtu.be/3O_3X7InOw8

It would be nice to have:

  • [ ] An example or instruction on how we can extend the PostCSS config to enable this
  • [ ] Maybe support this option in the module at some point by detecting development mode?

Here is the compiler and here is a Blog post about it

PostCSS Example:

  // postcss.config.js
  module.exports = {
    plugins: {
      '@tailwindcss/jit': {},
      autoprefixer: {},
    }
  }
enhancement

Most helpful comment

See #287

It will be only a jit: true option to activate it.

I already contributed to tailwindjit before the release :)

All 3 comments

See #287

It will be only a jit: true option to activate it.

I already contributed to tailwindjit before the release :)

image

Awesome!!

It confused me for some time, but if JIT is not being activated for you (you will get a message in the console saying it is activated) despite the settings above, you'll have to update, ie, "@nuxtjs/tailwindcss": "^4.0.1", in devDependencies in your package.json.

Was this page helpful?
0 / 5 - 0 ratings