postcss / postcss-nested

PostCSS plugin to unwrap nested rules like how Sass does it.
MIT License
1.15k stars 66 forks source link

Plugin hangs when using any nesting in conjunction with tailwindcss #120

Closed skoblenick closed 3 years ago

skoblenick commented 3 years ago

I have a project that uses postcss with the following config:

module.exports = {
  plugins: [
    require('postcss-import'),
    require('postcss-nested'),
    require('tailwindcss')('./tailwind.config.js'),
    require('autoprefixer'),
    require('cssnano'),
  ],
};

With v5.0.5 the above just hangs when there are any nested structures like:

@layer components  {
  .button {
    @apply border-2 border-transparent group cursor-pointer h-6 w-11;

    &--short {
      @apply button border-0 h-5 w-10;
    }
  }
}

With v5.0.1 this above doesn't hang and generated the expected output.

Let me know if you'd like an example repo that demonstrates the issue and I can throw one together.

ai commented 3 years ago

Can you make an example as simpler as possible and add expected and real output?

ai commented 3 years ago

Should be fixed with PostCSS 8.3.3.