nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23k stars 2.3k forks source link

Cannot use TailwindCSS V2 with Nx@11 and Next@10 #5194

Closed EpicHigh closed 3 years ago

EpicHigh commented 3 years ago

Current Behavior

Cannot use TailwindCSS V2 with Nx@11 and Next@10

Expected Behavior

Can use TailwindCSS V2 with Nx@11 and Next@10

Steps to Reproduce

I follow this guideline https://tailwindcss.com/docs/guides/nextjs

tailwind.config.js

module.exports = {
  purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {},
  },
  variants: {
    extend: {},
  },
  plugins: [],
}

postcss.config.js

// If you want to use other PostCSS plugins, see the following:
// https://tailwindcss.com/docs/using-with-preprocessors
module.exports = {
  plugins: {
    tailwindcss: { },
    autoprefixer: {},
  },
}

Failure Logs

PostCSS plugin tailwindcss requires PostCSS 8

Environment

 Node : 14.15.1
  OS   : darwin x64
  yarn : 1.22.10

  nx : Not Found
  @nrwl/angular : Not Found
  @nrwl/cli : 11.6.1
  @nrwl/cypress : 11.6.1
  @nrwl/devkit : 11.6.1
  @nrwl/eslint-plugin-nx : 11.6.1
  @nrwl/express : Not Found
  @nrwl/jest : 11.6.1
  @nrwl/linter : 11.6.1
  @nrwl/nest : Not Found
  @nrwl/next : 11.6.1
  @nrwl/node : Not Found
  @nrwl/react : 11.6.1
  @nrwl/schematics : Not Found
  @nrwl/tao : 11.6.1
  @nrwl/web : 11.6.1
  @nrwl/workspace : 11.6.1
  @nrwl/storybook : 11.6.1
  @nrwl/gatsby : Not Found
  typescript : 4.2.3
EpicHigh commented 3 years ago

My fault. I used @zeit/less. This package is too old and doesn't support the new feature. I change to another package name next-plugin-antd-less and it is work as expected. I decide the close my issue.

github-actions[bot] commented 1 year ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.