ixartz/Next-js-Boilerplate

How can we replace tailwindcss with unocss?

Closed this issue · 1 comments

Facing issue with postcss config for unocss

// Please do not use the array form (like ['tailwindcss', 'postcss-preset-env'])
// it will create an unexpected error: Invalid PostCSS Plugin found: [0]

/** @type {import('postcss-load-config').Config} */
module.exports = {
  plugins: {
    '@unocss/postcss': {},
  },
};

Seems to give error

⨯ ./src/styles/global.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[3]!./src/styles/global.css
Error: [object Object] is not a PostCSS plugin

The project focuses only Tailwind CSS and I don't have any experience with unocss