Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

No Tailwind CSS output when using postcss-easy-import #143

Closed
sboerrigter opened this issue Mar 23, 2021 · 2 comments
Closed

No Tailwind CSS output when using postcss-easy-import #143

sboerrigter opened this issue Mar 23, 2021 · 2 comments

Comments

@sboerrigter
Copy link

What version of @tailwindcss/jit are you using?

v.0.1.3

What version of Node.js are you using?

v15.12.0

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction repository

https://github.com/sboerrigter/tailwind-jit-easy-import

👋

When using postcss-easy-import (https://www.npmjs.com/package/postcss-easy-import) the compiler doesn't output any tailwind CSS and doesn't give any errors. You can reproduce this but by running npm run dev in the reproduction repository: https://github.com/sboerrigter/tailwind-jit-easy-import.

If you replace @tailwindcss/jit with tailwindcss in postcss.config.js the CSS output does get compiled correctly and the background of the page should turn green because of bg-green-500.

@sboerrigter sboerrigter changed the title No CSS output when using postcss-easy-import No Tailwind CSS output when using postcss-easy-import Mar 23, 2021
@adamwathan
Copy link
Member

Hey! In your case just need to move your plugins around in postcss.config.js:

  module.exports = {
    plugins: {
+     'postcss-easy-import': {},
      '@tailwindcss/jit': {},
-     'postcss-easy-import': {},
      autoprefixer: {},
    },
  }

The regular tailwindcss library has some special logic for treating @import "tailwindcss/base" as @tailwind base, but haven't added that to the JIT which is why you see the difference. Going to add that now I think anyways 👍

@sboerrigter
Copy link
Author

Thanks. Changing plugins the order fixes it indeed!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants