ixartz / Next-js-Boilerplate

🚀🎉📚 Boilerplate and Starter for Next.js 14+ with App Router and Page Router support, Tailwind CSS 3.4 and TypeScript ⚡️ Made with developer experience first: Next.js + TypeScript + ESLint + Prettier + Drizzle ORM + Husky + Lint-Staged + Vitest + Testing Library + Playwright + Storybook + Commitlint + VSCode + Netlify + PostCSS + Tailwind CSS ✨
https://nextjs-boilerplate.com
MIT License
8.7k stars 1.67k forks source link

How can we replace tailwindcss with unocss? #266

Closed rajexp closed 5 months ago

rajexp commented 5 months ago

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

ixartz commented 5 months ago

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