title: How to use Nuxt together with tailwind/nested using the PostCSS configuration object syntax instead of array syntax?
body: <p>My current setup is Nuxt 2.15.7 and Tailwind 3.0.9 <strong>without &quot;@nuxtjs/tailwindcss&quot;</strong>.</p>
  <p>I'm trying to use the tailwindcss/nesting plugin to support the deep selector '&gt;&gt;&gt;' - test-wise together with the postcss-nesting, as I can't get rid of the error:</p>
  <blockquote>
  <p>(64:3) Nested CSS was detected, but CSS nesting has not been
  configured correctly. Please enable a CSS nesting plugin <em>before</em>
  Tailwind in your configuration. See how here:
  <a href="https://tailwindcss.com/docs/using-with-preprocessors#nesting" rel="nofollow noreferrer">https://tailwindcss.com/docs/using-with-preprocessors#nesting</a></p>
  </blockquote>
  <p>despite my configuration is set up correctly according to the Tailwind documentation:</p>
  <pre><code>  build: {
      postcss: {
        plugins: {
          'postcss-import': true,
          'tailwindcss/nesting': {},
          'tailwindcss': {},
          'autoprefixer': {},
        },
      },
    },
  </code></pre>
  <p>The only difference is, I'm using the object syntax, not the array syntax and <code>'postcss-import': true</code> (tried 'postcss-import':{} as well)</p>
  <p>Now I thought it may be working when I use the <code>postcss-nesting</code> dependency according to their docs:</p>
  <pre><code>  build: {
      postcss: {
        plugins: [
          require('postcss-import'),
          require('tailwindcss/nesting')(require('postcss-nesting')),
          require('tailwindcss'),
          require('autoprefixer')
        ]
      }
    }
  </code></pre>
  <p>This however leads to this error:</p>
  <blockquote>
  <p><code>Cannot find module '0'  .... /node_modules/@nuxt/core/dist/core.js</code></p>
  </blockquote>
  <p><a href="https://nuxtjs.org/docs/features/configuration/#postcss-plugins" rel="nofollow noreferrer">https://nuxtjs.org/docs/features/configuration/#postcss-plugins</a></p>
  <p><strong>How can I use this expression <code>require('tailwindcss/nesting')(require('postcss-nesting'))</code> together with the PostCSS Configuration Object Syntax</strong></p>